player_device_req Struct Reference
Request/reply: (un)subscribe to a device. More...
#include <player_interfaces.h>
Collaboration diagram for player_device_req:
Detailed Description
Request/reply: (un)subscribe to a device.
This is the most important request! Before interacting with a device, the client must request appropriate access. Valid access modes are:
- PLAYER_OPEN_MODE : subscribe to the device. You will receive any data published by the device and you may send it commands and/or requests.
- PLAYER_CLOSE_MODE : unsubscribe from the device.
- PLAYER_ERROR_MODE : the requested access was not granted (only appears in responses)
To request access, send a PLAYER_PLAYER_REQ_DEV request that specifies the desired device address in the addr field and the desired access mode in access. Set driver_name_count to 0 and leave driver_name empty. The response will indicate the granted access in the access field and the name of the underyling driver in the driver_name field. Note that the granted access may not be the same as the requested access (e.g., if initialization of the driver failed).
Public Attributes | |
player_devaddr_t | addr |
Address of the device. | |
uint8_t | access |
The requested / granted access. | |
uint32_t | driver_name_count |
Length of driver name. | |
char | driver_name [PLAYER_MAX_DRIVER_STRING_LEN] |
The name of the underlying driver. | |
The documentation for this struct was generated from the following file: