Summary¶
| Members | Descriptions |
|---|---|
namespacedaas::api |
namespace daas::api¶
Summary¶
| Members | Descriptions |
|---|---|
classdaas::api::DaasWrapper |
Wrapper class that encapsulates the usage logic of the libdaas.a library. |
structdaas::api::DriverConfig |
Represents the configuration of a DaaS driver. |
structdaas::api::InterfaceInfo |
Describes a system interface and its status. |
class daas::api::DaasWrapper¶
Wrapper class that encapsulates the usage logic of the libdaas.a library.
Internally uses DaasAPI to expose high-level methods for initialization, driver configuration, and message transmission/reception.
Summary¶
| Members | Descriptions |
|---|---|
publicDaasWrapper(const char * config,IDaasApiEvent * eventHandler) |
Constructor. |
public~DaasWrapper() |
|
public std::vector< std::string >getActiveInterfaces() |
Returns the list of currently active network interfaces on the system. |
public std::vector<InterfaceInfo>listSystemInterfaces() |
Returns detailed information about all detected system interfaces. |
public daas_error_tdoInit(din_t sid,din_t din) |
Initializes the DaaS node with SID and DIN. |
public daas_error_tdoPerform(performs_mode_t mode) |
Starts the internal execution of the node. |
public daas_error_tdoEnd() |
Terminates the node activities. |
public daas_error_tdoReset() |
Resets the node state. |
public const char *getVersion() |
Returns the version of the libdaas.a library. |
public const char *listAvailableDrivers() |
Returns the list of available drivers. |
public nodestate_tgetStatus() |
Returns the current status of the local node. |
public const nodestate_t &status(din_t din) |
Returns the status of a given DIN. |
public const nodestate_t &fetch(din_t din,uint16_t opts) |
Fetches a node's status with optional flags. |
public dinlist_tlistNodes() |
Returns the list of known nodes. |
public boolstoreConfiguration(IDepot * storage_interface) |
Saves the current configuration using an IDepot interface. |
public boolloadConfiguration(IDepot * storage_interface) |
Loads the configuration using an IDepot interface. |
public daas_error_tenableDriver(link_t link,const char * driver) |
Enables a driver on a specific link. |
public daas_error_tmap(din_t din) |
Maps a node with known DIN (basic form) |
public daas_error_tmap(din_t din,link_t link,const char * uri) |
Maps a node specifying link and URI. |
public daas_error_tmap(din_t din,link_t link,const char * uri,const char * securityKey) |
Maps a node using a security key. |
public daas_error_tremove(din_t din) |
Removes a previously mapped node. |
public daas_error_tlocate(din_t din) |
Locates a node on the network. |
public daas_error_tavailablesPull(din_t din,uint32_t & count) |
Returns the number of packets available for reception. |
public daas_error_tpull(din_t din,DDO ** inboundDDO) |
Receives a DDO packet from a remote node. |
public daas_error_tpush(din_t din,DDO * outboundDDO) |
Sends a DDO packet to a remote node. |
public daas_error_tfrisbee(din_t din) |
Executes a quick fire-and-forget send. |
public voidsetEventHandler(IDaasApiEvent * event) |
Sets a new event handler. |
public const char *getInfos() |
Returns a string with internal information. |
public daas_error_tsetupNode(din_t sid,din_t din,link_t link,const char * uri) |
Quickly configures the node using inline parameters. |
public daas_error_tsetupNode(din_t sid,din_t din,link_t link,const char * localUri,din_t remoteDin,const char * remoteUri,const char * securityKey) |
Complete setup of a local node with driver and remote mapping. |
public daas_error_tsetupNode(const char * setupFilePath) |
Loads and configures a node from a JSON file. |
Members¶
publicDaasWrapper(const char * config,IDaasApiEvent * eventHandler)¶
Constructor.
Parameters¶
-
configOptional path to configuration file -
eventHandlerCustom handler for DaaS events
public~DaasWrapper()¶
public std::vector< std::string >getActiveInterfaces()¶
Returns the list of currently active network interfaces on the system.
This method scans the system's network interfaces and returns the names of those that are marked as "up" (IFF_UP). Duplicate names are removed.
Returns¶
Vector of interface names that are active.
public std::vector<InterfaceInfo>listSystemInterfaces()¶
Returns detailed information about all detected system interfaces.
This method inspects all available interfaces using getifaddrs() and /sys/class/net/<iface> to extract their name, type (Ethernet, WiFi, etc.), and operational status ("UP"/"DOWN"). It also attempts to detect Bluetooth interfaces under /sys/class/bluetooth, marking them as "Bluetooth (HCI)" with "UNKNOWN" status.
Returns¶
Vector of InterfaceInfo objects with name, type, and status.
public daas_error_tdoInit(din_t sid,din_t din)¶
Initializes the DaaS node with SID and DIN.
Parameters¶
-
sidSystem Identifier (e.g., network ID) -
dinDaaS Identifier (node ID)
Returns¶
Error code daas_error_t
public daas_error_tdoPerform(performs_mode_t mode)¶
Starts the internal execution of the node.
Parameters¶
modeExecution mode (e.g., PERFORM_CORE_THREAD)
Returns¶
Error code daas_error_t
public daas_error_tdoEnd()¶
Terminates the node activities.
Returns¶
Error code daas_error_t
public daas_error_tdoReset()¶
Resets the node state.
Returns¶
Error code daas_error_t
public const char *getVersion()¶
Returns the version of the libdaas.a library.
Returns¶
Version string (e.g., "0.20.1")
public const char *listAvailableDrivers()¶
Returns the list of available drivers.
Returns¶
Driver list string: 2.INET4;3.UART
public nodestate_tgetStatus()¶
Returns the current status of the local node.
Returns¶
Node status as nodestate_t
public const nodestate_t &status(din_t din)¶
Returns the status of a given DIN.
Parameters¶
dinDaaS Identifier
Returns¶
Node status
public const nodestate_t &fetch(din_t din,uint16_t opts)¶
Fetches a node's status with optional flags.
Parameters¶
-
dinDaaS Identifier -
optsFetch options
Returns¶
Node status
public dinlist_tlistNodes()¶
Returns the list of known nodes.
Returns¶
DIN list
public boolstoreConfiguration(IDepot * storage_interface)¶
Saves the current configuration using an IDepot interface.
Parameters¶
storage_interfacePointer to IDepot object
Returns¶
true if the save was successful
public boolloadConfiguration(IDepot * storage_interface)¶
Loads the configuration using an IDepot interface.
Parameters¶
storage_interfacePointer to IDepot object
Returns¶
true if the load was successful
public daas_error_tenableDriver(link_t link,const char * driver)¶
Enables a driver on a specific link.
Parameters¶
-
linkInterface type (e.g., LINK_INET4) -
driverURI to use (e.g., "127.0.0.1:3000")
Returns¶
Error code daas_error_t
public daas_error_tmap(din_t din)¶
Maps a node with known DIN (basic form)
Parameters¶
dinRemote node DIN
Returns¶
Error code
public daas_error_tmap(din_t din,link_t link,const char * uri)¶
Maps a node specifying link and URI.
Parameters¶
-
dinRemote node DIN -
linkInterface type -
uriRemote interface/address
Returns¶
Error code
public daas_error_tmap(din_t din,link_t link,const char * uri,const char * securityKey)¶
Maps a node using a security key.
Parameters¶
-
dinRemote DIN -
linkInterface type -
uriRemote address -
securityKeySecurity key (e.g., AES)
Returns¶
Error code
public daas_error_tremove(din_t din)¶
Removes a previously mapped node.
Parameters¶
dinRemote node DIN to remove
Returns¶
Error code
public daas_error_tlocate(din_t din)¶
Locates a node on the network.
Parameters¶
dinRemote DIN to locate
Returns¶
Error code
public daas_error_tavailablesPull(din_t din,uint32_t & count)¶
Returns the number of packets available for reception.
Parameters¶
-
dinNode DIN to query -
countNumber of pending packets
Returns¶
Error code
public daas_error_tpull(din_t din,DDO ** inboundDDO)¶
Receives a DDO packet from a remote node.
Parameters¶
-
dinSender DIN -
inboundDDOPointer to the received DDO
Returns¶
Error code
public daas_error_tpush(din_t din,DDO * outboundDDO)¶
Sends a DDO packet to a remote node.
Parameters¶
-
dinDestination DIN -
outboundDDOPointer to the DDO to send
Returns¶
Error code
public daas_error_tfrisbee(din_t din)¶
Executes a quick fire-and-forget send.
Parameters¶
dinDestination DIN
Returns¶
Error code
public voidsetEventHandler(IDaasApiEvent * event)¶
Sets a new event handler.
Parameters¶
eventNew handler to use
public const char *getInfos()¶
Returns a string with internal information.
Returns¶
Info string
public daas_error_tsetupNode(din_t sid,din_t din,link_t link,const char * uri)¶
Quickly configures the node using inline parameters.
Parameters¶
-
sidSystem ID -
dinNode ID -
linkInterface type -
uriURI for the driver
Returns¶
Error code
public daas_error_tsetupNode(din_t sid,din_t din,link_t link,const char * localUri,din_t remoteDin,const char * remoteUri,const char * securityKey)¶
Complete setup of a local node with driver and remote mapping.
This overload encapsulates the typical initialization sequence:
-
Initializes the local node (doInit)
-
Enables the selected driver (enableDriver)
-
Maps a remote node (map)
It reduces boilerplate for newcomers and allows a node to be ready in a single call. Returns the first error encountered, or ERROR_NONE if all steps succeed.
Parameters¶
-
sidSystem ID of the local node. -
dinNode ID of the local node. -
linkCommunication link technology (e.g., _LINK_INET4). -
localUriLocal URI for the driver (e.g., "192.168.1.10:2020"). -
remoteDinDIN of the remote node to map. -
remoteUriURI of the remote node (e.g., "192.168.1.20:2020"). -
securityKeyOptional security key to use during mapping; if nullptr, mapping is performed without key.
Returns¶
daas_error_t Error code or ERROR_NONE if successful.
public daas_error_tsetupNode(const char * setupFilePath)¶
Loads and configures a node from a JSON file.
Parameters¶
setupFilePathPath to the JSON file
Returns¶
Error code daas_error_t
struct daas::api::DriverConfig¶
Represents the configuration of a DaaS driver.
Summary¶
| Members | Descriptions |
|---|---|
public link_tlink |
|
public std::stringuri |
Members¶
public link_tlink¶
public std::stringuri¶
struct daas::api::InterfaceInfo¶
Describes a system interface and its status.
Summary¶
| Members | Descriptions |
|---|---|
public std::stringname |
|
public std::stringtype |
|
public std::stringstatus |
Members¶
public std::stringname¶
public std::stringtype¶
public std::stringstatus¶
Generated by Moxygen