AGirs
Macros | Functions | Variables
Girs.cpp File Reference
#include "config.h"
#include "GirsLib/LedLcdManager.h"
#include "GirsLib/GirsUtils.h"
#include "GirsLib/StreamParser.h"
#include <avr/pgmspace.h>
#include <Ethernet.h>
#include <IPAddress.h>
#include <IrReceiverSampler.h>
#include <IrWidgetAggregating.h>
#include "GirsLib/version.h"
Include dependency graph for Girs.cpp:

Go to the source code of this file.

Macros

#define LED_PARAMETER_CONST   const
 
#define PARAMETERS_NAME
 
#define PARAMETER_CONST   const
 
#define modulesSupported   EXPAND_AND_QUOTE(Base TRANSMIT_NAME CAPTURE_NAME RENDERER_NAME RECEIVE_NAME DECODER_NAME LED_NAME LCD_NAME PARAMETERS_NAME NAMED_COMMANDS_NAME PRONTO_NAME)
 
#define PROGNAME   "AGirs"
 
#define okString   "OK"
 
#define errorString   "ERROR"
 
#define timeoutString   "."
 

Functions

EthernetServer server (PORT)
 
static void flushIn (Stream &stream)
 
static void decodeOrDump (IrReader *irReader, Stream &stream)
 
static bool receive (StreamParser &parser)
 
static bool capture (Stream &stream)
 
void setup ()
 
static bool isPrefix (const char *string, const char *cmd)
 
bool isPrefix (const char *cmd, const __FlashStringHelper *pstring)
 
bool isPrefix (const __FlashStringHelper *pstring, const char *cmd)
 
static void readCommand (char *cmd, size_t cmdLength, StreamParser &parser)
 
static bool processCommand (const char *cmd, StreamParser &parser)
 
static bool readProcessOneCommand (Stream &stream)
 
bool readProcessOneTcpCommand (EthernetClient &client)
 
void loop ()
 

Variables

static PARAMETER_CONST unsigned long captureEndingTimeout = DEFAULT_CAPTURE_ENDINGTIMEOUT
 
static const unsigned sensorNo = 1
 
static PARAMETER_CONST unsigned long receiveEndingTimeout = DEFAULT_RECEIVE_ENDINGTIMEOUT
 
static PARAMETER_CONST unsigned long beginTimeout = DEFAULT_BEGINTIMEOUT
 
static PARAMETER_CONST uint16_t captureSize = DEFAULT_CAPTURESIZE
 
static const uint8_t receiverNo = 1
 
static constexpr size_t cmdLength = 20U
 Allocated length (-1) for commands etc. More...
 

Macro Definition Documentation

◆ errorString

#define errorString   "ERROR"

Definition at line 152 of file Girs.cpp.

◆ LED_PARAMETER_CONST

#define LED_PARAMETER_CONST   const

Definition at line 86 of file Girs.cpp.

◆ modulesSupported

Definition at line 143 of file Girs.cpp.

◆ okString

#define okString   "OK"

Definition at line 151 of file Girs.cpp.

◆ PARAMETER_CONST

#define PARAMETER_CONST   const

Definition at line 94 of file Girs.cpp.

◆ PARAMETERS_NAME

#define PARAMETERS_NAME

Definition at line 93 of file Girs.cpp.

◆ PROGNAME

#define PROGNAME   "AGirs"

Definition at line 145 of file Girs.cpp.

◆ timeoutString

#define timeoutString   "."

Definition at line 153 of file Girs.cpp.

Function Documentation

◆ capture()

static bool capture ( Stream &  stream)
static

Definition at line 271 of file Girs.cpp.

◆ decodeOrDump()

static void decodeOrDump ( IrReader *  irReader,
Stream &  stream 
)
static

Definition at line 198 of file Girs.cpp.

◆ flushIn()

static void flushIn ( Stream &  stream)
static

Definition at line 191 of file Girs.cpp.

◆ isPrefix() [1/3]

bool isPrefix ( const __FlashStringHelper *  pstring,
const char *  cmd 
)

Definition at line 453 of file Girs.cpp.

◆ isPrefix() [2/3]

bool isPrefix ( const char *  cmd,
const __FlashStringHelper *  pstring 
)

Definition at line 449 of file Girs.cpp.

◆ isPrefix() [3/3]

static bool isPrefix ( const char *  string,
const char *  cmd 
)
static

Definition at line 445 of file Girs.cpp.

◆ loop()

void loop ( )

Definition at line 774 of file Girs.cpp.

◆ processCommand()

static bool processCommand ( const char *  cmd,
StreamParser parser 
)
static

Definition at line 478 of file Girs.cpp.

◆ readCommand()

static void readCommand ( char *  cmd,
size_t  cmdLength,
StreamParser parser 
)
static

Definition at line 458 of file Girs.cpp.

◆ readProcessOneCommand()

static bool readProcessOneCommand ( Stream &  stream)
static

Definition at line 747 of file Girs.cpp.

◆ readProcessOneTcpCommand()

bool readProcessOneTcpCommand ( EthernetClient &  client)

Definition at line 761 of file Girs.cpp.

◆ receive()

static bool receive ( StreamParser parser)
static

Definition at line 239 of file Girs.cpp.

◆ server()

EthernetServer server ( PORT  )

◆ setup()

void setup ( )

Definition at line 345 of file Girs.cpp.

Variable Documentation

◆ beginTimeout

PARAMETER_CONST unsigned long beginTimeout = DEFAULT_BEGINTIMEOUT
static

Definition at line 123 of file Girs.cpp.

◆ captureEndingTimeout

PARAMETER_CONST unsigned long captureEndingTimeout = DEFAULT_CAPTURE_ENDINGTIMEOUT
static

Definition at line 116 of file Girs.cpp.

◆ captureSize

PARAMETER_CONST uint16_t captureSize = DEFAULT_CAPTURESIZE
static

Definition at line 124 of file Girs.cpp.

◆ cmdLength

constexpr size_t cmdLength = 20U
staticconstexpr

Allocated length (-1) for commands etc.

Definition at line 158 of file Girs.cpp.

◆ receiveEndingTimeout

PARAMETER_CONST unsigned long receiveEndingTimeout = DEFAULT_RECEIVE_ENDINGTIMEOUT
static

Definition at line 120 of file Girs.cpp.

◆ receiverNo

const uint8_t receiverNo = 1
static

Definition at line 131 of file Girs.cpp.

◆ sensorNo

const unsigned sensorNo = 1
static

Definition at line 117 of file Girs.cpp.