HAN-FUN API  1.5.3
This project provides the common implementation of ULE Alliance's HAN-FUN application protocol.
HF::Core::BatchProgramManagement::IEntries Struct Referenceabstract

Batch Program Management - Persistent Storage API. More...

#include <batch_program_management.h>

+ Inheritance diagram for HF::Core::BatchProgramManagement::IEntries:
+ Collaboration diagram for HF::Core::BatchProgramManagement::IEntries:

Public Member Functions

virtual Common::Result save (const uint8_t pid, const std::string &name, std::vector< Action > &actions)=0
 Store the given entry to persistent storage. More...
 
virtual Common::Result destroy (const uint8_t pid)=0
 Remove the program with the given pid ftom. More...
 
virtual void clear (void)=0
 Erase all the DB entries.
 
virtual EntryPtr find (const uint8_t pid) const =0
 Find the program with the given pid. More...
 
virtual EntryPtr find (const std::string &name) const =0
 Find the program with the given name. More...
 
virtual uint8_t next_pid () const =0
 Return next available PID for the program. More...
 
- Public Member Functions inherited from HF::Common::IEntries< Entry >
virtual uint16_t size () const=0
 Return the number of entries in the container. More...
 
virtual Result save (const Entry &entry)=0
 Store the given entry to persistent storage. More...
 
virtual Result destroy (const Entry &entry)=0
 Destroy the given entry in the persistent storage. More...
 

Detailed Description

Batch Program Management - Persistent Storage API.

Definition at line 347 of file batch_program_management.h.

Member Function Documentation

◆ destroy()

virtual Common::Result HF::Core::BatchProgramManagement::IEntries::destroy ( const uint8_t  pid)
pure virtual

Remove the program with the given pid ftom.

Parameters
[in]pidthe Program ID to destroy.
Return values
Result::OKif the entry was destroyed,
Result::FAIL_ARGif no entry with pid exists,
Result::FAIL_UNKNOWNotherwise.

Implemented in HF::Core::BatchProgramManagement::Entries.

◆ find() [1/2]

virtual EntryPtr HF::Core::BatchProgramManagement::IEntries::find ( const uint8_t  pid) const
pure virtual

Find the program with the given pid.

Parameters
[in]pidthe Program ID to search for.
Returns
pointer to the program with the given pid, nullptr otherwise.

Implemented in HF::Core::BatchProgramManagement::Entries.

Referenced by HF::Core::BatchProgramManagement::IServer::entry().

+ Here is the caller graph for this function:

◆ find() [2/2]

virtual EntryPtr HF::Core::BatchProgramManagement::IEntries::find ( const std::string &  name) const
pure virtual

Find the program with the given name.

Parameters
[in]nameprogram name to search for.
Returns
pointer to the program with the given name, nullptr otherwise.

Implemented in HF::Core::BatchProgramManagement::Entries.

◆ next_pid()

virtual uint8_t HF::Core::BatchProgramManagement::IEntries::next_pid ( ) const
pure virtual

Return next available PID for the program.

Returns
the PID to use in the program entry, or Entry::AVAILABLE_PID if no PID is available.

Implemented in HF::Core::BatchProgramManagement::Entries.

Referenced by HF::Core::BatchProgramManagement::IServer::next_pid().

+ Here is the caller graph for this function:

◆ save()

virtual Common::Result HF::Core::BatchProgramManagement::IEntries::save ( const uint8_t  pid,
const std::string &  name,
std::vector< Action > &  actions 
)
pure virtual

Store the given entry to persistent storage.

Parameters
[in]pidProgram ID for the new entry.
[in]namename for the new batch program.
[in]actionsAction list for the batch program.
Return values
Common::Result::OKif the entry was saved,
Common::Result::FAIL_UNKNOWNotherwise.

Implemented in HF::Core::BatchProgramManagement::Entries.


The documentation for this struct was generated from the following file: