Table of Contents
List of Tables
Table of Contents
This link: config_app.c connects to the main page of its class - OK.
This link: CAppConfig connects to the CAppConfig section - OK.
These links connect to the class members in Doxygen HTML output, but NOT in Docbook .xml files or HTML output:
The same is true of this link: domain
Table of Contents
Configure the application parameters here. If you have permanent storage, like a USB memory or access to the flash file system, load the configuration from there.
void APP_InitializeConfig ( CAppConfig * config)
CDataHubPoint * APP_CreateAndSetPoint ( CTCPConnectionContainer * cc, CTCPClient * client, char * name, int flags, INT64 value)
void APP_SetPointInt ( CDataHubPoint * point, INT64 value)
void APP_SetPointDouble ( CDataHubPoint * point, double value)
void APP_SetPointString ( CDataHubPoint * point, char * value)
Initialize the application configuration object. This object must be allocated before entry to this function, and is typically created as a global static variable in the mainline_c mainline. You can modify this structure to suit your application requirements.
In the example code the contents of this object are hard-coded. In a production system you may prefer to store this information in persistent storage and then read it into the CAppConfig object here.
This file contains a definition of the CAppConfig structure that is passed to the application-specific configuration functions during application start-up. You can modify the CAppConfig strucure to suit your application requirements.
CDataHubPoint * APP_CreateAndSetPoint ( CTCPConnectionContainer * cc, CTCPClient * client, char * name, int flags, INT64 value)
void APP_SetPointInt ( CDataHubPoint * point, INT64 value)
void APP_SetPointDouble ( CDataHubPoint * point, double value)
void APP_SetPointString ( CDataHubPoint * point, char * value)
void APP_ConfigureTimers ( CAppConfig * config)
void APP_ConfigurePoints ( CAppConfig * config)
void APP_ConfigureModbus ( CAppConfig * config)
void APP_ConfigureUserThreads ( CAppConfig * config)
void APP_InitializeConfig ( CAppConfig * config)
#define APP_HeapSize 65536
#define APP_HeapSize_ APP_HeapSize
#define INIT_DNS 1
#define INIT_DHCP 1
#define INIT_GATEWAY 1
#define STATIC_SERVER_IP_ADDRESS IP_ADDRESS(192,168,0,2)
#define STATIC_SERVER_NETMASK 0xFFFFFF00UL
#define STATIC_DNS_SERVER_ADDRESS IP_ADDRESS(8,8,8,8)
#define STATIC_IP_GATEWAY_ADDRESS IP_ADDRESS(192,168,0,1)
Defines an application-specific structure containing information that is required during start-up. In the example code, this information is supplied in config_app.c. In other instances this information might be stored as persistent configuration in flash memory. An application developer should add or remove members in this structure to suit the application requirements.
Initialize the application configuration object. This object must be allocated before entry to this function, and is typically created as a global static variable in the mainline_c mainline. You can modify this structure to suit your application requirements.
In the example code the contents of this object are hard-coded. In a production system you may prefer to store this information in persistent storage and then read it into the CAppConfig object here.
The APP_HeapSize is used to determine the amount of memory to reserve for user thread stacks, internal structures, inter-thread messages and #CDataHubPoint structures. You application will consume memory from this heap depending on the number of connections, threads, points and timers that are configured. During development you can look at the performance of the heap by examining the global variables #ME_Total, #ME_Hiwater, #ME_Nallocs, #ME_Nfrees, #ME_Nreallocs and #ME_Hiaddress.
Each user thread requires a stack whose size is defined by #ETK_THREAD_STACK_SIZE.
Each data point requires approximately 500 bytes. This varies with the length of the point name.
Each #CTimer requires approximately 80 bytes.
Each inter-thread message in flight requires 56 bytes, plus the length of a string if the message contains a point change notification for which the value is a string type.
We need to configure the heap size with a constant because we need to reserve heap early in the initialization process, before we have set the application configuration. This means that we cannot configure the application heap size dynamically from a configuration file.
With Renesas Synergy, you can override the default heap size in the properties list of the Skkynet ETK module.
Definition at line 59 of file config_app.h
The Documentation for this define was generated from the following file:
config_app.h
The number of bytes in the Skkynet ETK memory heap. See APP_HeapSize for more information.
Definition at line 66 of file config_app.h
The Documentation for this define was generated from the following file:
config_app.h
Allow the mainline to assign the DNS server
Definition at line 116 of file config_app.h
The Documentation for this define was generated from the following file:
config_app.h
Allow the mainline to assign the IP address using DHCP
Definition at line 122 of file config_app.h
The Documentation for this define was generated from the following file:
config_app.h
Allow the mainline to assign the IP gateway
Definition at line 125 of file config_app.h
The Documentation for this define was generated from the following file:
config_app.h
The static IP address if DHCP is not enabled
Definition at line 127 of file config_app.h
The Documentation for this define was generated from the following file:
config_app.h
The netmask if DHCP is not enabled
Definition at line 128 of file config_app.h
The Documentation for this define was generated from the following file:
config_app.h
The DNS server address if DHCP is not enabled
Definition at line 129 of file config_app.h
The Documentation for this define was generated from the following file:
config_app.h
Table of Contents
#include <config_app.h>
CTCPConnectionContainer * cc
CTCPClient * client
int useWebsocket
int useSsl
char * hostname
char * portname
char * domain
char * username
char * password
int pwtype
int pollUsecs
int retrySecs
int disconnectSecs
MSCLOCK heartbeat
MSCLOCK timeout
MSCLOCK retry
int heapBytes
char * modbusHost
char * modbusPort
int modbusSlaveId
int modbusPollMs
ULONG macAddressLsw
ULONG macAddressMsw
Defines an application-specific structure containing information that is required during start-up. In the example code, this information is supplied in config_app.c. In other instances this information might be stored as persistent configuration in flash memory. An application developer should add or remove members in this structure to suit the application requirements.
Definition at line 77 of file config_app.h
The Documentation for this struct was generated from the following file:
config_app.h
Needed by many ETK API calls
Definition at line 78 of file config_app.h
The Documentation for this struct was generated from the following file:
config_app.h
The client that connects to the DataHub or SkkyHub server
Definition at line 79 of file config_app.h
The Documentation for this struct was generated from the following file:
config_app.h
0 or 1, indicating whether to connect using WebSocket
Definition at line 80 of file config_app.h
The Documentation for this struct was generated from the following file:
config_app.h
0 or 1, indicating whether to use SSL (not implemented)
Definition at line 81 of file config_app.h
The Documentation for this struct was generated from the following file:
config_app.h
The name of the DataHub/SkkyHub server
Definition at line 82 of file config_app.h
The Documentation for this struct was generated from the following file:
config_app.h
The port number (as a string) to connect to on the DataHub/SkkyHub server
Definition at line 83 of file config_app.h
The Documentation for this struct was generated from the following file:
config_app.h
The data domain into which data will be stored
Definition at line 84 of file config_app.h
The Documentation for this struct was generated from the following file:
config_app.h
The user name for authentication on the server
Definition at line 85 of file config_app.h
The Documentation for this struct was generated from the following file:
config_app.h
The password for authentication on the server
Definition at line 86 of file config_app.h
The Documentation for this struct was generated from the following file:
config_app.h
The type of password encoding
Definition at line 87 of file config_app.h
The Documentation for this struct was generated from the following file:
config_app.h
The number of microseconds per poll. ThreadX has a 10ms tick, so this should be a multiple of 10000
Definition at line 88 of file config_app.h
The Documentation for this struct was generated from the following file:
config_app.h
The number of seconds between socket connection re-tries when connecting to the server
Definition at line 89 of file config_app.h
The Documentation for this struct was generated from the following file:
config_app.h
The number of seconds to wait before disconnecting after a connection to the server is made. This has the effect of periodically connecting and updating data, then disconnecting again.
Definition at line 90 of file config_app.h
The Documentation for this struct was generated from the following file:
config_app.h
The keep-alive heartbeat rate
Definition at line 91 of file config_app.h
The Documentation for this struct was generated from the following file:
config_app.h
The keep-alive timeout. If no data or heartbeat is received from the server within this time, disconnect the socket.
Definition at line 92 of file config_app.h
The Documentation for this struct was generated from the following file:
config_app.h
Internal. Use retrySecs instead.
Definition at line 93 of file config_app.h
The Documentation for this struct was generated from the following file:
config_app.h
Internal. Holds the configured heap size.
Definition at line 96 of file config_app.h
The Documentation for this struct was generated from the following file:
config_app.h
The address of the Modbus slave device
Definition at line 99 of file config_app.h
The Documentation for this struct was generated from the following file:
config_app.h
The port number (as a string) for the Modbus slave device
Definition at line 100 of file config_app.h
The Documentation for this struct was generated from the following file:
config_app.h
The Modbus slave ID (1-254)
Definition at line 101 of file config_app.h
The Documentation for this struct was generated from the following file:
config_app.h
The number of milliseconds between Modbus polls
Definition at line 102 of file config_app.h
The Documentation for this struct was generated from the following file:
config_app.h
The MAC address low 32 bits
Definition at line 105 of file config_app.h
The Documentation for this struct was generated from the following file:
config_app.h
#include "cogentcetk.h"
#include "config_app.h"
#include "sf_el_nx_cfg.h"
void APP_InitializeConfig ( CAppConfig * config)
CDataHubPoint * APP_CreateAndSetPoint ( CTCPConnectionContainer * cc, CTCPClient * client, char * name, int flags, INT64 value)
void APP_SetPointInt ( CDataHubPoint * point, INT64 value)
void APP_SetPointDouble ( CDataHubPoint * point, double value)
void APP_SetPointString ( CDataHubPoint * point, char * value)
#define APP_HeapSize 65536
#define APP_HeapSize_ APP_HeapSize
#define INIT_DNS 1
#define INIT_DHCP 1
#define INIT_GATEWAY 1
#define STATIC_SERVER_IP_ADDRESS IP_ADDRESS(192,168,0,2)
#define STATIC_SERVER_NETMASK 0xFFFFFF00UL
#define STATIC_DNS_SERVER_ADDRESS IP_ADDRESS(8,8,8,8)
#define STATIC_IP_GATEWAY_ADDRESS IP_ADDRESS(192,168,0,1)
CDataHubPoint * APP_CreateAndSetPoint ( CTCPConnectionContainer * cc, CTCPClient * client, char * name, int flags, INT64 value)
void APP_SetPointInt ( CDataHubPoint * point, INT64 value)
void APP_SetPointDouble ( CDataHubPoint * point, double value)
void APP_SetPointString ( CDataHubPoint * point, char * value)
void APP_ConfigureTimers ( CAppConfig * config)
void APP_ConfigurePoints ( CAppConfig * config)
void APP_ConfigureModbus ( CAppConfig * config)
void APP_ConfigureUserThreads ( CAppConfig * config)
void APP_InitializeConfig ( CAppConfig * config)