Public Attributes
TMR_SR_SerialTransport Struct Reference

#include <tmr_serial_transport.h>

List of all members.

Public Attributes

void * cookie
TMR_Status(* flush )(TMR_SR_SerialTransport *)
TMR_Status(* open )(TMR_SR_SerialTransport *)
TMR_Status(* receiveBytes )(TMR_SR_SerialTransport *, uint32_t length, uint32_t *messageLength, uint8_t *message, const uint32_t timeoutMs)
TMR_Status(* sendBytes )(TMR_SR_SerialTransport *, uint32_t length, uint8_t *message, const uint32_t timeoutMs)
TMR_Status(* setBaudRate )(TMR_SR_SerialTransport *, uint32_t rate)
TMR_Status(* shutdown )(TMR_SR_SerialTransport *)

Detailed Description

The TMR_SR_SerialTransport structure is the mechanism that the SerialReader layer uses to conduct low-level communications with the device. Users may create their own SerialTransport objects for systems with custom serial communication needs, and then use TMR_SR_SerialReader_init() to complete the construction of the reader object, as an alternative to using TMR_create().

See also:
TMR_SR_SerialPortTransportInit and TMR_SR_LlrpEapiTransportInit for pre-existing TMR_SR_SerialTransport implementations.

Definition at line 73 of file tmr_serial_transport.h.


Member Data Documentation

Context value made avaliable to callback functions

Definition at line 76 of file tmr_serial_transport.h.

This callback takes any actions necessary (possibly none) to remove unsent data from the output path.

Parameters:
thisThe TMR_SR_SerialTransport structure.

Definition at line 139 of file tmr_serial_transport.h.

This callback causes the communication interface to be opened but does not transmit any serial-layer data. This should perform actionms such as opening a serial port device or establishing a network connection within a wrapper protocol.

Parameters:
thisThe TMR_SR_SerialTransport structure.

Definition at line 86 of file tmr_serial_transport.h.

TMR_Status(* TMR_SR_SerialTransport::receiveBytes)(TMR_SR_SerialTransport *, uint32_t length, uint32_t *messageLength, uint8_t *message, const uint32_t timeoutMs)

This callback recieves bytes message on the serial transport. The length parameter contains the size of the buffer pointed to by message. If the operation takes longer than timeoutMs to receive length bytes, TMR_ERROR_TIMEOUT should be returned.

Parameters:
thisThe TMR_SR_SerialTransport structure.
lengthThe number of bytes to receive.
[out]messageLengthThe number of bytes received.
[out]messagePointer to the location to store recieved bytes.
timeoutMsThe duration for the operation to complete.

Definition at line 113 of file tmr_serial_transport.h.

TMR_Status(* TMR_SR_SerialTransport::sendBytes)(TMR_SR_SerialTransport *, uint32_t length, uint8_t *message, const uint32_t timeoutMs)

This callback transmits the provided bytes on the serial transport. If the operation takes longer than timeoutMs to complete, TMR_ERROR_TIMEOUT should be returned.

Parameters:
thisThe TMR_SR_SerialTransport structure.
lengthThe number of bytes to send.
messagePointer to the bytes to send.
timeoutMsThe duration for the operation to complete.

Definition at line 98 of file tmr_serial_transport.h.

This callback causes the underlying serial transport connected to the device to the provided baud rate.

Parameters:
thisThe TMR_SR_SerialTransport structure.
rateThe baud rate to set.

Definition at line 122 of file tmr_serial_transport.h.

This callback releases any resources allocated by the transport layer and informs the other end, if necessary, that the connection is ending.

Parameters:
thisThe TMR_SR_SerialTransport structure.

Definition at line 131 of file tmr_serial_transport.h.


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


thingmagic_rfid
Author(s): Brian Bingham
autogenerated on Thu May 16 2019 03:01:27