RCKit
Public Member Functions | List of all members
EthernetTransceiver Class Reference

Defines an Ethernet RCOIP Transceiver. More...

#include <EthernetTransceiver.h>

Inheritance diagram for EthernetTransceiver:
Inheritance graph
[legend]
Collaboration diagram for EthernetTransceiver:
Collaboration graph
[legend]

Public Member Functions

 EthernetTransceiver (byte *macaddress, IPAddress *ipaddress, unsigned int port=RCOIP_DEFAULT_RECEIVER_UDP_PORT)
 
virtual void init ()
 
virtual void run ()
 
virtual void sendReply (uint8_t *msg, uint16_t len)
 
- Public Member Functions inherited from Transceiver
virtual void setDelegate (RCRx *delegate)
 
virtual void receivedRequest (uint8_t *msg, uint16_t len, uint16_t rssi=0)
 

Additional Inherited Members

- Protected Attributes inherited from Transceiver
RCRx_delegate
 Object whose handleRequest() function will be called whenever an RCOIP message is received.
 

Detailed Description

Defines an Ethernet RCOIP Transceiver.

This is one of several types of Transceiver that RCRx can use to communicate with an RCOIP transmitter. It works with the standard Arduino Ethernet library, and with the following hardware:

Constructor & Destructor Documentation

◆ EthernetTransceiver()

EthernetTransceiver::EthernetTransceiver ( byte *  macaddress,
IPAddress *  ipaddress,
unsigned int  port = RCOIP_DEFAULT_RECEIVER_UDP_PORT 
)

Constructor. Creates a new EthernetTransceiver object with the given addresses. The addresses should be unique in your network.

Parameters
[in]macaddressThe MAC address for this hsot, an array of 6 bytes
[in]ipaddressThe IPv4 IP address for this host
[in]portThe UDP port to listen for RCOIP requests, defaults to RCOIP_DEFAULT_RECEIVER_UDP_PORT (9048)
Author
Mike McCauley (mikem.nosp@m.@air.nosp@m.spayc.nosp@m.e.co.nosp@m.m)

Member Function Documentation

◆ init()

void EthernetTransceiver::init ( )
virtual

Initialise the object. Call this once before using the Transceiver

Reimplemented from Transceiver.

◆ run()

void EthernetTransceiver::run ( )
virtual

Poll the object for activity. This is expected to be called frequently in the main loop It processes the Ethernet stack, checking for received messages. During processing, and RCOIP message receibed by the preconfigured port and address will be given to the RCRx object pointed to by _delegate

Reimplemented from Transceiver.

References Transceiver::receivedRequest().

◆ sendReply()

void EthernetTransceiver::sendReply ( uint8_t *  msg,
uint16_t  len 
)
virtual

Send an RCOIP reply message to the sender of the current received message.

Parameters
[in]msgPointer to the RCOP message.
[in]lenLength of the RCOIP message in bytes.

Reimplemented from Transceiver.


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