Description of the IO layer to the application layer. The application layer uses functions described here to access the io layer.
- Warning
- This part concerns the developers wishing to create a new io layer. The end-user should not access this layer directly.
int gxPLIoClose |
( |
gxPLIo * |
io | ) |
|
Close the input-output layer.
- Parameters
-
- Returns
- 0, -1 if error occurs
int gxPLIoIoCtl |
( |
gxPLIo * |
io, |
|
|
int |
c, |
|
|
va_list |
ap |
|
) |
| |
device-specific input/output operations
- Parameters
-
io | io layer |
c | device-dependent request code |
ap | iterating arguments from gxPLIoCtl() |
- Returns
- 0, -1 if error occurs
Opening of the input-output layer.
- Parameters
-
setting | pointer to a configuration, this configuration can be modified by the function to return the actual configuration. |
- Returns
- the object or NULL if error occurs
int gxPLIoRecv |
( |
gxPLIo * |
io, |
|
|
void * |
buffer, |
|
|
int |
count, |
|
|
gxPLIoAddr * |
source |
|
) |
| |
Receive a message from the network.
The call can be blocking, gxPLIoFuncPoll will be used before so you do not block.
- Parameters
-
io | io layer |
buffer | a buffer in which bytes are stored |
count | number of bytes requested |
source | if not NULL, returns the source address. |
- Returns
- number of bytes read, a negative value if error
int gxPLIoSend |
( |
gxPLIo * |
io, |
|
|
const void * |
buffer, |
|
|
int |
count, |
|
|
const gxPLIoAddr * |
target |
|
) |
| |
Send a message to the network.
- Parameters
-
io | io layer |
buffer | buffer where the bytes were stored |
count | number of bytes to send |
target | if target is NULL or if her broadcast flag is set, the broadcast address of the network is used. |
- Returns
- number of bytes sent or frame identifier (greater than or equal to one), a negative value if error occurs