NordicStream Class Reference

#include <nrf_stream.hpp>

Inheritance diagram for NordicStream:
Collaboration diagram for NordicStream:

Public Member Functions

void setDestAddr (uint8_t address)
 
void setPktHops (uint8_t hops)
 
bool flush (void)
 Flush all buffered data or send any pending data immediately. More...
 
bool getChar (char *pInputChar, unsigned int timeout=portMAX_DELAY)
 
bool putChar (char out, unsigned int timeout=portMAX_DELAY)
 
- Public Member Functions inherited from CharDev
bool gets (char *pBuff, int maxLen, unsigned int timeout=0xffffffff)
 
int printf (const char *format,...)
 
int scanf (const char *format,...)
 
uint16_t getPrintfMemSize (void) const
 
bool put (const char *pString, unsigned int timeout=0xffffffff)
 
void putline (const char *pBuff, unsigned int timeout=0xffffffff)
 
bool isReady (void)
 
void setReady (bool r)
 

Friends

class SingletonTemplate< NordicStream >
 Friend class used for Singleton Template. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from SingletonTemplate< NordicStream >
static NordicStreamgetInstance ()
 Public member to get instance of this SINGLETON class. More...
 
- Protected Member Functions inherited from CharDev
 CharDev ()
 
virtual ~CharDev ()
 
- Protected Member Functions inherited from SingletonTemplate< NordicStream >
 SingletonTemplate ()
 
- Static Protected Attributes inherited from SingletonTemplate< NordicStream >
static SingletonTemplatempSingletonInstance
 

Detailed Description

Nordic char device driver

This class provides a way to use the nordic like a char device. You can use printf(), scanf() etc, and all the data will be sent to the address set by setDestAddr(). If the destination address is not set, then it will be sent to the last source that sent us data on nordic.

Member Function Documentation

bool NordicStream::flush ( void  )
virtual

Flush all buffered data or send any pending data immediately.

Reimplemented from CharDev.

bool NordicStream::getChar ( char *  pInputChar,
unsigned int  timeout = portMAX_DELAY 
)
virtual

Virtual function overrides for the base class to work

Implements CharDev.

bool NordicStream::putChar ( char  out,
unsigned int  timeout = portMAX_DELAY 
)
virtual

Outputs a char given by

Parameters
out
timeoutOptional parameter which defaults to maximum value that will allow you to wait forever for a character to be sent
Returns
true if the output char was successfully written to Queue, or false if the output queue was full within the given timeout

Implements CharDev.

void NordicStream::setDestAddr ( uint8_t  address)
inline

Set the destination address. If address is set to zero, then the packets will be sent to the last source that sent us the packet.

void NordicStream::setPktHops ( uint8_t  hops)
inline

Friends And Related Function Documentation

friend class SingletonTemplate< NordicStream >
friend

Friend class used for Singleton Template.


The documentation for this class was generated from the following files:
  • /var/www/html/SJSU-DEV-Linux/firmware/default/lib/L2_Drivers/nrf_stream.hpp
  • /var/www/html/SJSU-DEV-Linux/firmware/default/lib/L2_Drivers/src/nrf_stream.cpp