|
Engage Engine API
1.253.9093
|
Custom Network Devices. More...
Go to the source code of this file.
Macros | |
| #define | ENGAGE_API __attribute__ ((visibility ("default"))) |
Typedefs | |
| typedef int(* | PFN_ENGAGE_NETWORK_DEVICE_CTL) (int16_t deviceId, EngageNetworkDeviceCtlOp_t op, const char *jsonMetaData, uintptr_t p1, uintptr_t p2, uintptr_t p3, uintptr_t p4, uintptr_t p5) |
| Network Device Control instance control pointer. | |
Enumerations | |
| enum | EngageNetworkDeviceCtlOp_t { enetStart , enetStop , enetSend , enetRecv } |
| Network Device Control Operation enum. More... | |
Functions | |
| ENGAGE_API int16_t | engageNetworkDeviceRegister (const char *jsonConfiguration, PFN_ENGAGE_NETWORK_DEVICE_CTL pfnCtl) |
| [SYNC] Registers a network device with the Engine | |
| ENGAGE_API int16_t | engageNetworkDeviceUnregister (int16_t deviceId) |
| [SYNC] Unregisters a network device | |
Variables | |
| static const int | ENGAGE_NETWORK_DEVICE_RESULT_OK = 0 |
| Everything is fine. | |
| static const int | ENGAGE_NETWORK_DEVICE_GENERAL_ERROR = -1 |
| A general error occurred. | |
| static const int | ENGAGE_NETWORK_DEVICE_INVALID_CONFIGURATION = -2 |
| Unable to register device due to invalid configuration. | |
| static const int | ENGAGE_NETWORK_DEVICE_INVALID_DEVICE_ID = -3 |
| Invalid deviceId. | |
| static const int | ENGAGE_NETWORK_DEVICE_INVALID_INSTANCE_ID = -4 |
| Invalid instanceId. | |
| static const int | ENGAGE_NETWORK_DEVICE_INVALID_COMBINED_DEVICE_ID_AND_INSTANCE_ID = -5 |
| Invalid deviceId and instanceId. | |
| static const int | ENGAGE_NETWORK_DEVICE_INVALID_OPERATION = -6 |
| An invalid operation has been attempted. | |
Custom Network Devices.
Definition in file EngageNetworkDevice.h.
| #define ENGAGE_API __attribute__ ((visibility ("default"))) |
Definition at line 28 of file EngageNetworkDevice.h.
| typedef int(* PFN_ENGAGE_NETWORK_DEVICE_CTL) (int16_t deviceId, EngageNetworkDeviceCtlOp_t op, const char *jsonMetaData, uintptr_t p1, uintptr_t p2, uintptr_t p3, uintptr_t p4, uintptr_t p5) |
Network Device Control instance control pointer.
| deviceId | The device identifier |
| op | The operation to carry out |
| jsonMetaData | JSON metadata associated with the operation |
| p1 | Variable type based on op |
| p2 | Variable type based on op |
| p3 | Variable type based on op |
| p4 | Variable type based on op |
| p5 | Variable type based on op |
When:
op | jsonMetadata | p1 | p2 | p3 | p4 | p5 |
enetStart | ? | | | | | | enetStop | ? | | | | | | enetSend | ? | buff | buffSz | timeoutMs | | | enetRecv | ? | buff | maxBuffSz | timeoutMs | | |
Definition at line 123 of file EngageNetworkDevice.h.
Network Device Control Operation enum.
More detailed enum description.
| Enumerator | |
|---|---|
| enetStart | Start operation. |
| enetStop | Stop operation. |
| enetSend | Send a buffer. |
| enetRecv | Read a buffer. |
Definition at line 36 of file EngageNetworkDevice.h.
| ENGAGE_API int16_t engageNetworkDeviceRegister | ( | const char * | jsonConfiguration, |
| PFN_ENGAGE_NETWORK_DEVICE_CTL | pfnCtl ) |
[SYNC] Registers a network device with the Engine
The jsonConfiguration JSON configuration object contains the configuration for the network device and the pfnCtl is a pointer to a control structure used to manage the device's instance.
| jsonConfiguration | pointer to JSON Network Device configuration object ConfigurationObjects::NetworkDeviceDescriptor |
| pfnCtl | pointer to an Network Device Control instance |
| ENGAGE_API int16_t engageNetworkDeviceUnregister | ( | int16_t | deviceId | ) |
[SYNC] Unregisters a network device
Unregisters the network device created by engageNetworkDeviceRegister
| deviceId | device identifier returned engageNetworkDeviceRegister |
|
static |
A general error occurred.
This could be due to a number of reasons. See debug output logs for more information.
Definition at line 62 of file EngageNetworkDevice.h.
|
static |
Invalid deviceId and instanceId.
Both deviceId and instanceId used are no longer valid. See debug output logs for more information.
Definition at line 90 of file EngageNetworkDevice.h.
|
static |
Unable to register device due to invalid configuration.
This could be due to a number of reasons. See debug output logs for more information.
Definition at line 69 of file EngageNetworkDevice.h.
|
static |
Invalid deviceId.
The deviceId used is no longer valid. See debug output logs for more information.
Definition at line 76 of file EngageNetworkDevice.h.
|
static |
Invalid instanceId.
The instanceId used is no longer valid. See debug output logs for more information.
Definition at line 83 of file EngageNetworkDevice.h.
|
static |
An invalid operation has been attempted.
An invalid operation was attempted, please make sure you use a valid operation from EngageNetworkDeviceCtlOp_t enum and that the device is in the correct state. See debug output logs for more information.
Definition at line 97 of file EngageNetworkDevice.h.
|
static |
Everything is fine.
The operation executed without any errors.
Definition at line 55 of file EngageNetworkDevice.h.