projectdefs.h File Reference


Detailed Description

This file defines some basic structures and enumerators for SRCP handling.

Software License
See the MBCSL for details.
Author:
Sven Schlender (kontakt at mobacon dot de)
Date:
2009-04-30

Definition in file srcp/projectdefs.h.

Go to the source code of this file.

Data Structures

struct  SPSRCPCONFIG
 The fields in this structure configure the common SRCP handling. More...
struct  _PERS_PROTOCOL_CONFIG
 The structure elements define a SRCP protocol like it is stored in EEPROM. More...
struct  SPSET
 The structure elements define a SRCP object (GA or GL) stored in EEPROM. More...

Defines

#define PROJECT_ID   SRCP_PROJECT
 The project identifier.
#define PROJECT_NAME   "srcp"
 The project name used by the display and the web interface.
#define PROJECT_SERVICE_NAME   "_srcp"
 The name of the service to search for (used by the MDNS module).
#define PROJECT_DEFAULT_PORT   (4303u)
 The standard port for SRCP servers.
#define SRCP_NAME_MAXLEN   16
 Maximum supported name length here (protocol names, descriptions).
#define SRCP_PROTO_MAXLEN   3
 Maximum length of SRCP protocol specifiers (i.e. "N 1").
#define SRCP_SERVERCACHE_ID   0xFE
 Internal identifier for a configuration set (loco data) from server cache.
#define SRCP_EEPROMSET_ID   0xFF
 Internal identifier for a configuration set from persistent storage.
#define MAX_PROTO_SLOTS   8
 Maximum count of supported protocols (N for GL and N for GA).
#define MAX_SRCP_FUNCTIONS   13
 Maximum supported loco functions (F0 inclusive).
#define MAX_SRCP_SPEEDSTEPS   128
 Maximum supported loco speed steps.
#define SRCP_EEPROMSET_COUNT   32
 Count of maximum configurations in EEPROM (shared between GAs and GLs).
#define SRCP_GLEEPROMSET_COUNT   16
 Count of maximum GL configurations in EEPROM.
#define SRCP_GAEEPROMSET_COUNT   4
 Count of maximum GA configurations in EEPROM.
#define SRCP_EEPROMSET_IDX_MASK   0x0F
 Mask for generating the device independent EEPROM set ID.
#define SRCP_EEPROMSET_GA_MASK   0x10
 Simple identifier mask for an GA EEPROM set.
#define SRCP_CONFIG_EEPROM_ADD   (0x0200u)
 EEPROM byte address for common SRCP configuration data.
#define SRCP_PROTOS_EEPROM_ADD   (0x0300u)
 EEPROM byte address for SRCP protocol data.
#define SRCP_SETS_EEPROM_ADD   (0x0800u)
 EEPROM byte address for SRCP set data.
#define PROJECT_SOCKET_CONFIGURATION
 This macro defines the used sockets for this project.
#define PROJECT_INITIAL_INIT   SRCPInitialInit
 This macro is used as hook in the ApplInit function.
#define PROJECT_LOCO_DIR_MODE_HAS_CHANGED   SRCPLocoDirModeHasChanged
 This macro is used as hook in the ApplChangeLocoDirMode function.
#define PROJECT_HANDLE_SERVER_CONNECTION   SRCPHandleServerConnection
 This macro is used as hook in the main task of the APPL Module.
#define PROJECT_RESET_TO_FACTORY   SRCPRestoreToFactory
 This macro is used as hook in the ApplResetToFactory function.
#define PROJECT_PREPARE_CONNECTION   SRCPPrepareConnection
 This macro is used as hook in the main task of the APPL Module.
#define PROJECT_START_DISCONNECT   SRCPStartDisconnect
 This macro is used as hook in the disconnect function of the APPL module.
#define PROJECT_IS_CONNECTED   SRCPIsConnected
 This macro is used as hook in the ApplIsConnected function.
#define PROJECT_MAIN   SRCPMain
 This macro is used as hook in the main task of the APPL Module.
#define PROJECT_WEBSITES
 Defines the sites for this project.

Functions

void SRCPRestoreToFactory (void)
 Resets the SRCP related stuff to a well known start configuration.
BOOL SRCPIsConnected (void)
 Delivers if the SRCP client is actually connected with the server.
void SRCPInitialInit (void)
 This function must be called on startup to load the persistent SRCP configuration data into RAM and to do some initialization.
void SRCPStartDisconnect (void)
 Start disconnecting from server.
void SRCPPrepareConnection (void)
 Prepare internal state before starting a connect to the SRCP server.
APPL_CONNECTING_RETCODE SRCPHandleServerConnection (void)
 State machine is called during connecting and handshaking to or disconnecting from SRCP server.
BOOL SRCPMain (void)
 The main state machine of the SRCP client is called during the client is connected with the SRCP server.
void SRCPLocoDirModeHasChanged (void)
 Takes changes on the changed direction mode for locos.


Generated on Sun Nov 27 20:02:39 2011 for eWicht by  doxygen 1.5.5