vrLib SDK Documentation
Protocol_PRO4_Packet Class
NamespacesVideoRay.CommunicationProtocol_PRO4_Packet
PRO4 protocol packet
Declaration Syntax
C#Visual BasicVisual C++
public class Protocol_PRO4_Packet
Public Class Protocol_PRO4_Packet
public ref class Protocol_PRO4_Packet
Members
All MembersConstructorsMethodsPropertiesFields



IconMemberDescription
Protocol_PRO4_Packet()()()
Default Constructor

Protocol_PRO4_Packet(array<Byte>[]()[], Boolean)
Construct a protocol packet from a header buffer

Protocol_PRO4_Packet(array<Byte>[]()[], array<Byte>[]()[])
Construct a protocol packet from a header buffer and a payload buffer

ADDR_CONFIG_DATA
Address for CONFIGURATION DATA special register

ADDR_CONFIG_DATA_SIZE
Address for CONFIGURATION DATA size

ADDR_CUSTOM_COMMAND
Address for special custom command register

ADDR_DEVICE_ID
The device ID returns the factory programmed unique ID for this device

ADDR_GROUP_ID
Address for device group id, used for multicast

ADDR_NODE_ID
Address for device node id

ADDR_REBOOT
The Reboot register is 16-bit at addresses 0xFE-0xFF Writing the value 0xDEAD into the reboot register should causes the device to reboot after a delay.

Build_Request(Byte, Byte, Byte, array<Byte>[]()[])
Create and populate a request packet

Build_Request_ConfigData(Byte)
Create and populate a request packet for getting the CONFIGURATION DATA

Build_Request_DeviceID(Byte)
Create and populate a request packet for getting the DEVICE ID

Build_Response(Byte, Byte, Byte, Byte, array<Byte>[]()[])
Create and populate a response packet

CalcHeaderChecksum()()()
Calculate the header checksum

CalcPayloadChecksum()()()
Calculate the Payload checksum

CSR_LENGTH
Length of entire CSR including non-device specific region

CSR_SAVE_SETTINGS_COMPLETE
Signal data has been saved

CSR_SAVE_SETTINGS_PASSWORD
Flag to save parameters when written to th appropriatre register

DeviceType
Return the DeviceType byte for a Reponse Packet Note: Packet type and payload length checking is NOT done

Equals(Object)
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Format_Request(Byte, Byte, Byte, array<Byte>[]()[])
Fill out the packet header and set the payload bytes.

Format_Response(Byte, Byte, Byte, Byte, array<Byte>[]()[])
Fill out the packet header and set the payload bytes.

FormatHeaderFromBuffer(array<Byte>[]()[])
GetHashCode()()()
Serves as a hash function for a particular type.
(Inherited from Object.)
GetType()()()
Gets the Type of the current instance.
(Inherited from Object.)
header
ID_BROADCAST
Predefined Broadcast ID

ID_MULTICAST_FLAG
Flag indicating id is a multicast/broadcast

ID_RELAY_REQUEST_FLAG
Flag indicating id is a multicast/broadcast

IsBroadcast
Test to check if ID is a broadcast or not

IsDeviceSpecific
Test to check if packet is devices specific

IsExtendedLength
Test to see if this is an extended length packet

IsMulticast
Test to check if packet id is a broadcast/multicast or not

IsRequest
Test to check if packet is a request

IsResponse
Test to check if packet is a response

LENGTH_EXTENDED
Used to designate an extended length packet of > 254 bytes

NO_RESPONSE
Indicates no response requested

PacketBuffer
Get the entire packet buffer. In general it is not a great idea to use the entire buffer since processing will be dependent upon packet structure.

payload
Get the data payload bytes

payloadChecksum
PROTOCOL_PRO4_DATA_PAYLOAD_START_INDEX
Index into bit buffer where the data payload starts

PROTOCOL_PRO4_EXTENDED_LENGTH_HEADER_SIZE
Explicit size of protocol Header

PROTOCOL_PRO4_EXTENDED_LENGTH_REQUEST_DATA_PAYLOAD_START_INDEX
Index into bit buffer where the extended length request packet data payload starts

PROTOCOL_PRO4_EXTENDED_LENGTH_RESPONSE_DATA_PAYLOAD_START_INDEX
Index into bit buffer where the extended length response packet data payload starts

PROTOCOL_PRO4_HEADER_ADDR_ADDRESS
Address of Address bytes in the header

PROTOCOL_PRO4_HEADER_ADDR_FLAGS
Address of Flag bytes in the header

PROTOCOL_PRO4_HEADER_ADDR_ID
Address of ID byte in the header

PROTOCOL_PRO4_HEADER_ADDR_LENGTH
Address of Length bytes in the header

PROTOCOL_PRO4_HEADER_ADDR_SYNC
Address of sync bytes in the header

PROTOCOL_PRO4_HEADER_ADDR_XSUM
Address of Checksum bytes in the header

PROTOCOL_PRO4_HEADER_SIZE
Explicit size of protocol Header

PROTOCOL_PRO4_REQUEST_DATA_PAYLOAD_START_INDEX
Index into bit buffer where the request packet data payload starts

PROTOCOL_PRO4_RESPONSE_DATA_PAYLOAD_START_INDEX
Index into bit buffer where the response packet data payload starts

REBOOT_CODE
16-bit code used to command a device reboot sequence, LSB first

REBOOT_CODE_1
Reboot code byte 1

REBOOT_CODE_2
Reboot code byte 2

RESPONSE_CSR_DUMP
FLAG indicates a CSR dump from address to end of CSR file

RESPONSE_LENGTH_MASK
Mask which gives response length from FLAGS byte

RESPONSE_LENGTH_MAX
Max length of specified standard response

RESPONSE_TYPE_FLAG
FLAG bit to indicate non-device specific response

ResponseLength
Get the requested response length. Returns -1 if flags indicated device specific repsonse

SetData(Byte, UInt32)
Set a byte in the data payload portion of the packet

SYNC_REQUEST
Start of request packet synchronization bytes

SYNC_REQUEST_1
Start of request packet synchronization byte 1

SYNC_REQUEST_2
Start of request packet synchronization byte 2

SYNC_RESPONSE
Start of response packet synchronization bytes

SYNC_RESPONSE_1
Start of response packet synchronization byte 1

SYNC_RESPONSE_2
Start of response packet synchronization byte 2

TOP_OF_CSR
Address for top of CSR file

ToString()()()
Print the packet as a string of hex values
(Overrides Object.ToString()()().)
Remarks
The PRO4 protocol is a robust packetized communication protocol suitable for low latency control applications on a multi-party physical layer. Each device on the physical bus presents a memory mapped CSR (Control Status Register) interface. The protocol also supports the wrapping of non memory mapped protocols through writes to a special Custom Command Register. Responses from devices can either be dumps of consecutive addresses in the memory map, or device defined specific response packets. All data packets are composed of a 7 byte header, followed by 0 to 254 data payload bytes, and ending in a checksum of the total packet. Request packets may have no data payload. The first byte in a response packet data payload is ALWAYS a VideoRay designated device type. The PRO4 protcol is fully compatible with the Futaba RS301CR/RS302CD servos. Note: when multibyte data is sent it is recommended the LSB is sent first. Please see the document PRO4_Communication_Protocol.doc for more details.
Inheritance Hierarchy
Object
Protocol_PRO4_Packet

Assembly: vrLib (Module: vrLib) Version: 2.0.1.0 (2.0.1.0)