![]() |
EVE 1.0
|
|
Data Structures | |
| struct | datapump_vtbl_t |
| struct | datapump_cfg_t |
| struct | datapump_t |
Macros | |
| #define | DATAPUMP_FLAGS_CAN_READ (1 << 0) |
| #define | DATAPUMP_FLAGS_CAN_WRITE (1 << 1) |
| #define | DATAPUMP_FLAGS_CLOSE (1 << 2) |
| #define | DATAPUMP_FLAGS_CLOSED (1 << 3) |
Typedefs | |
| typedef int(* | datapump_connect_task_cb) (struct datapump_t *Pump) |
Functions | |
| static bool | DatapumpInit (struct datapump_t *Pump, const struct datapump_vtbl_t *Vtbl, const struct datapump_cfg_t *PumpCfg) |
| void | DatapumpFree (struct datapump_t *Pump) |
| bool | DatapumpRead (struct datapump_t *Pump, uint8_t *Buffer, size_t Length) |
| bool | DatapumpWrite (struct datapump_t *Pump, const uint8_t *Buffer, size_t Length) |
| size_t | DatapumpBytesIn (struct datapump_t *Pump) |
| #define DATAPUMP_FLAGS_CAN_READ (1 << 0) |
Datapump slave pump task can read data
Definition at line 51 of file datapump.h.
| #define DATAPUMP_FLAGS_CAN_WRITE (1 << 1) |
Datapump master pump task can write data
Definition at line 52 of file datapump.h.
| #define DATAPUMP_FLAGS_CLOSE (1 << 2) |
Request for datapump pump tasks to terminate
Definition at line 53 of file datapump.h.
| #define DATAPUMP_FLAGS_CLOSED (1 << 3) |
Datapump slave task has been terminated
Definition at line 54 of file datapump.h.
| typedef int(* datapump_connect_task_cb) (struct datapump_t *Pump) |
A callback which will be called in a task context to open a socket for connection
| Pump | A socket to be created for this datapump |
Definition at line 64 of file datapump.h.
|
inlinestatic |
Initializes a connection and starts data pump tasks
| Pump | Pointer to an uninitialized data pump instance |
| Vtbl | Pointer to a virtual function table |
| PumpCfg | Constant pointer to a data pump configuration |
Definition at line 122 of file datapump.h.
References DatapumpBytesIn(), DatapumpFree(), DatapumpRead(), DatapumpWrite(), datapump_t::PumpCfg, and datapump_t::Vtbl.
| void DatapumpFree | ( | struct datapump_t * | Pump | ) |
Deallocates resources, associated with a datapump.
| Pump | Pointer to a data pump instance |
Referenced by DatapumpInit().
| bool DatapumpRead | ( | struct datapump_t * | Pump, |
| uint8_t * | Buffer, | ||
| size_t | Length | ||
| ) |
Receives data from a datapump connection.
The function can be called from a Contiki process. It always read complete data blocks.
| Pump | Pointer to a datapump instance |
| Buffer | A buffer to put data into |
| Length | Length of the buffer (number of bytes to read) |
Referenced by DatapumpInit().
| bool DatapumpWrite | ( | struct datapump_t * | Pump, |
| const uint8_t * | Buffer, | ||
| size_t | Length | ||
| ) |
Sends data to a datapump connection.
The function can be called from a Contiki process. It always read complete data blocks.
| Pump | Pointer to a datapump instance |
| Buffer | A buffer to put data into |
| Length | Length of the buffer (number of bytes to read) |
Referenced by DatapumpInit().
| size_t DatapumpBytesIn | ( | struct datapump_t * | Pump | ) |
Returns the number of bytes ready in the incoming buffer.
| Pump | Pointer to a datapump data pump instance |
Referenced by DatapumpInit().