|
Soletta™ Framework
|
A packet type defines what's the content of a packet and how it's stored and retrieved. More...
#include <sol-flow-packet.h>
Data Fields | |
| uint16_t | api_version |
| API version number. More... | |
| uint16_t | data_size |
| Data's size of a given packet type. More... | |
| void(* | dispose )(const struct sol_flow_packet_type *packet_type, void *mem) |
| Disposes a packet instance of this type. More... | |
| int(* | get )(const struct sol_flow_packet_type *packet_type, const void *mem, void *output) |
| Retrieves the content from a packet of this type. More... | |
| struct sol_flow_packet *(* | get_constant )(const struct sol_flow_packet_type *packet_type, const void *value) |
| Internal. More... | |
| int(* | init )(const struct sol_flow_packet_type *packet_type, void *mem, const void *input) |
| Initializes a packet instance of this type. More... | |
| const char * | name |
| Type's name. More... | |
A packet type defines what's the content of a packet and how it's stored and retrieved.
| uint16_t sol_flow_packet_type::api_version |
API version number.
| uint16_t sol_flow_packet_type::data_size |
Data's size of a given packet type.
| void(* sol_flow_packet_type::dispose)(const struct sol_flow_packet_type *packet_type, void *mem) |
Disposes a packet instance of this type.
| type | The packet's type |
| mem | Packet's data to be disposed |
| int(* sol_flow_packet_type::get)(const struct sol_flow_packet_type *packet_type, const void *mem, void *output) |
Retrieves the content from a packet of this type.
| type | The packet's type |
| mem | Packet's data memory (the content) |
| output | Where to store a copy the packet's content |
0 on success, error code (always negative) otherwise | struct sol_flow_packet*(* sol_flow_packet_type::get_constant)(const struct sol_flow_packet_type *packet_type, const void *value) |
Internal.
Used for types that have a set of constant values.
This way no allocation is needed.
| type | The packet's type |
| value | Constant initial value |
| int(* sol_flow_packet_type::init)(const struct sol_flow_packet_type *packet_type, void *mem, const void *input) |
Initializes a packet instance of this type.
| type | The packet's type |
| mem | Packet's data memory (the content) |
| input | Initial data for the packet's content |
0 on success, error code (always negative) otherwise | const char* sol_flow_packet_type::name |
Type's name.
1.8.6