Various constants.
This file defines constants that are not expected to change. Constants that are board specific should be placed in the system_config/ directory.
Go to the source code of this file.
#define | USB_MAX_PACKET_SIZE 64u |
The maximum size of a USB packet to / from the bulk endpoint. More... | |
#define | USB_READ_BUFFER_SIZE 576u |
The maximum transfer size of a Ja Rule USB command. More... | |
#define | USB_POLLING_INTERVAL 1u |
The polling interval for the bulk endpoint in milliseconds. More... | |
#define | RDM_START_CODE 0xccu |
The RDM Start Code. | |
#define | RDM_SUB_START_CODE 0x01u |
The RDM Sub-start Code. | |
#define | START_OF_MESSAGE_ID 0x5au |
The Start of Message identifier. | |
#define | END_OF_MESSAGE_ID 0xa5u |
The End of Message Identifier. | |
#define | PAYLOAD_SIZE 513u |
The maximum payload size in a message. | |
#define | DEFAULT_BREAK_TIME 176u |
The break time in microseconds. | |
#define | DEFAULT_MARK_TIME 12u |
The mark time in microseconds. | |
#define | DEFAULT_RDM_BROADCAST_TIMEOUT 28u |
The time to listen for a response after sending an RDM broadcast. More... | |
#define | DEFAULT_RDM_RESPONSE_TIMEOUT 28u |
The default RDM response timeout for a controller. More... | |
#define | DEFAULT_RDM_DUB_RESPONSE_LIMIT 29000u |
The default maximum time an RDM DUB response can take. More... | |
#define | DEFAULT_RDM_RESPONDER_DELAY 1760u |
The default time to wait before sending an RDM response. More... | |
enum | { MAC_ADDRESS_SIZE = 6 } |
The size of a MAC address. | |
enum | Command { COMMAND_RESET_DEVICE = 0x00, COMMAND_SET_MODE = 0x01, COMMAND_GET_HARDWARE_INFO = 0x02, COMMAND_RUN_SELF_TEST = 0x03, COMMAND_SET_BREAK_TIME = 0x10, COMMAND_GET_BREAK_TIME = 0x11, COMMAND_SET_MARK_TIME = 0x12, COMMAND_GET_MARK_TIME = 0x13, COMMAND_SET_RDM_BROADCAST_TIMEOUT = 0x20, COMMAND_GET_RDM_BROADCAST_TIMEOUT = 0x21, COMMAND_SET_RDM_RESPONSE_TIMEOUT = 0x22, COMMAND_GET_RDM_RESPONSE_TIMEOUT = 0x23, COMMAND_SET_RDM_DUB_RESPONSE_LIMIT = 0x24, COMMAND_GET_RDM_DUB_RESPONSE_LIMIT = 0x25, COMMAND_SET_RDM_RESPONDER_DELAY = 0x26, COMMAND_GET_RDM_RESPONDER_DELAY = 0x27, COMMAND_SET_RDM_RESPONDER_JITTER = 0x28, COMMAND_GET_RDM_RESPONDER_JITTER = 0x29, TX_DMX = 0x30, COMMAND_RDM_DUB_REQUEST = 0x40, COMMAND_RDM_REQUEST = 0x41, COMMAND_RDM_BROADCAST_REQUEST = 0x42, COMMAND_ECHO = 0xf0, GET_FLAGS = 0xf2 } |
The Ja Rule message commands. More... | |
enum | ReturnCode { RC_OK = 0, RC_UNKNOWN = 1, RC_BUFFER_FULL = 2, RC_BAD_PARAM = 3, RC_TX_ERROR = 4, RC_RDM_TIMEOUT = 5, RC_RDM_BCAST_RESPONSE = 6, RC_RDM_INVALID_RESPONSE = 7, RC_INVALID_MODE = 8, RC_TEST_FAILED = 9, RC_CANCELLED = 10 } |
JaRule command return codes. More... | |
#define DEFAULT_RDM_BROADCAST_TIMEOUT 28u |
The time to listen for a response after sending an RDM broadcast.
Measured in 10ths of a millisecond. This can be 0, since we don't expect responses from broadcast messages, however by waiting we can detect bad responders, so we set this the same as DEFAULT_RDM_RESPONSE_TIMEOUT.
#define DEFAULT_RDM_DUB_RESPONSE_LIMIT 29000u |
The default maximum time an RDM DUB response can take.
Measured in in 10ths of a microsecond. From Line 3, Table 3-3, E1.20.
#define DEFAULT_RDM_RESPONDER_DELAY 1760u |
The default time to wait before sending an RDM response.
Measured in in 10ths of a microsecond. From Table 3-4, E1.20.
#define DEFAULT_RDM_RESPONSE_TIMEOUT 28u |
The default RDM response timeout for a controller.
Measured is in 10ths of a millisecond, from Line 1 & 3, Table 3-2, E1.20. Responders have 2ms (see Table 3-4), and then in line proxies can introduce up to 704uS of delay. This rounds to 2.8 ms.
#define USB_MAX_PACKET_SIZE 64u |
The maximum size of a USB packet to / from the bulk endpoint.
64 bytes is the highest value a full speed, bulk endpoint can use.
#define USB_POLLING_INTERVAL 1u |
The polling interval for the bulk endpoint in milliseconds.
1ms is the shortest polling interval USB allows.
#define USB_READ_BUFFER_SIZE 576u |
The maximum transfer size of a Ja Rule USB command.
This should be a multiple of USB_MAX_PACKET_SIZE.
enum Command |
The Ja Rule message commands.
Enumerator | |
---|---|
COMMAND_RESET_DEVICE |
Reset the device. See Reset. |
COMMAND_SET_MODE |
Change the operating mode of the device.
|
COMMAND_GET_HARDWARE_INFO |
Get the hardware info for the device.
|
COMMAND_RUN_SELF_TEST |
Run a loopback self test.
|
COMMAND_SET_BREAK_TIME |
Set the break time of the transceiver. See Set Break Time. |
COMMAND_GET_BREAK_TIME |
Fetch the current transceiver break time. See Get Break Time. |
COMMAND_SET_MARK_TIME |
Set the mark-after-break time of the transceiver. See Set Mark Time. |
COMMAND_GET_MARK_TIME |
Fetch the current transceiver mark-after-break time. See Get Mark Time. |
COMMAND_SET_RDM_BROADCAST_TIMEOUT |
Set the RDM Broadcast timeout. See Set RDM Broadcast Timeout. |
COMMAND_GET_RDM_BROADCAST_TIMEOUT |
Get the RDM Broadcast timeout. See Get RDM Broadcast Timeout. |
COMMAND_SET_RDM_RESPONSE_TIMEOUT |
Set the RDM Response timeout. See Set RDM Response Timeout. |
COMMAND_GET_RDM_RESPONSE_TIMEOUT |
Get the RDM Response timeout. See Get RDM Response Timeout. |
COMMAND_SET_RDM_DUB_RESPONSE_LIMIT |
Set the RDM DUB Response limit. See Set RDM DUB Response Limit. |
COMMAND_GET_RDM_DUB_RESPONSE_LIMIT |
Get the RDM Response limit. See Get RDM DUB Response Limit. |
COMMAND_SET_RDM_RESPONDER_DELAY |
Set the RDM responder delay. See Set RDM Responder Delay. |
COMMAND_GET_RDM_RESPONDER_DELAY |
Get the RDM responder delay. See Get RDM Responder Delay. |
COMMAND_SET_RDM_RESPONDER_JITTER |
Set the RDM responder jitter. See Set RDM Responder Jitter. |
COMMAND_GET_RDM_RESPONDER_JITTER |
Get the RDM responder jitter. See Get RDM Responder Jitter. |
TX_DMX |
Transmit a DMX frame. See Transmit DMX512. |
COMMAND_RDM_DUB_REQUEST |
Send an RDM Discovery Unique Branch and wait for a response. See Transmit RDM DUB. |
COMMAND_RDM_REQUEST |
Send an RDM Get / Set command. See Transmit RDM Get / Set. |
COMMAND_RDM_BROADCAST_REQUEST |
Send a broadcast RDM command. See Transmit Broadcast RDM Get / Set. |
COMMAND_ECHO |
Echo the data back. See Echo. |
GET_FLAGS |
Get the flags state. |
enum ReturnCode |
JaRule command return codes.