VEXcode Doxygen
Public Member Functions | List of all members
vex::serial_link Class Reference

Use the serial_link class to send raw data bytes between vexlink devices. More...

#include <vex_vexlink.h>

Inheritance diagram for vex::serial_link:
vex::vexlink vex::device

Public Member Functions

 serial_link (int32_t index, const char *name, linkType type, bool isWired=false)
 Creates a new serial_link object on the port specified. More...
 
int32_t send (uint8_t *buffer, int32_t length)
 
int32_t send (const char *buffer, int32_t length)
 
int32_t receive (uint8_t *buffer, int32_t length, int32_t timeoutMs=500)
 
void received (void(*callback)(uint8_t *, int32_t))
 
- Public Member Functions inherited from vex::device
 device (int32_t index)
 
V5_DeviceType type ()
 
int32_t index ()
 
void init (int32_t index)
 
virtual int32_t value ()
 
uint32_t timestamp ()
 

Additional Inherited Members

- Protected Attributes inherited from vex::device
int32_t _index
 
int32_t _threadID
 

Detailed Description

Use the serial_link class to send raw data bytes between vexlink devices.

Constructor & Destructor Documentation

◆ serial_link()

vex::serial_link::serial_link ( int32_t  index,
const char *  name,
linkType  type,
bool  isWired = false 
)

Creates a new serial_link object on the port specified.

Parameters
indexThe port index for this serial_link. The index is zero-based.

The documentation for this class was generated from the following file: