![]() |
HAN-FUN API
1.5.3
This project provides the common implementation of ULE Alliance's HAN-FUN application protocol.
|
Batch Program Management - Persistent Storage API. More...
#include <batch_program_management.h>
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... | |
![]() | |
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... | |
Batch Program Management - Persistent Storage API.
Definition at line 347 of file batch_program_management.h.
|
pure virtual |
Remove the program with the given pid
ftom.
[in] | pid | the Program ID to destroy. |
Result::OK | if the entry was destroyed, |
Result::FAIL_ARG | if no entry with pid exists, |
Result::FAIL_UNKNOWN | otherwise. |
Implemented in HF::Core::BatchProgramManagement::Entries.
|
pure virtual |
Find the program with the given pid
.
[in] | pid | the Program ID to search for. |
pid
, nullptr
otherwise. Implemented in HF::Core::BatchProgramManagement::Entries.
Referenced by HF::Core::BatchProgramManagement::IServer::entry().
|
pure virtual |
Find the program with the given name
.
[in] | name | program name to search for. |
name
, nullptr
otherwise. Implemented in HF::Core::BatchProgramManagement::Entries.
|
pure virtual |
Return next available PID for the program.
Entry::AVAILABLE_PID
if no PID is available. Implemented in HF::Core::BatchProgramManagement::Entries.
Referenced by HF::Core::BatchProgramManagement::IServer::next_pid().
|
pure virtual |
Store the given entry
to persistent storage.
[in] | pid | Program ID for the new entry. |
[in] | name | name for the new batch program. |
[in] | actions | Action list for the batch program. |
Common::Result::OK | if the entry was saved, |
Common::Result::FAIL_UNKNOWN | otherwise. |
Implemented in HF::Core::BatchProgramManagement::Entries.