Header Batch File Definitions
The header batch file sets up the Master Control, Heartbeat, and ServiceLevel variables, and Input and Output Control points as well as the server and client agents. You must load the header batch file from the machine on which LEC Server is installed after the configuration .db file has been imported and prior to any other batch files (see Configuration Setup, Startup, and Remote Batch Load for more information on loading batch files). This batch file is called AppTestAHeader.csv, and by default it is located in C:\ProgramData\LiveEnergyConnect\Config. The following section defines each table and row in the example header batch file.
On this page:
#IccpUaServerAgent
The following table defines the agent in the OPC UA server VMD.
Node or Property | Value | Defines |
---|---|---|
#IccpUaServerAgent |
AgentS |
Name given to the OPC UA server agent node. |
<ServerIP> |
opc.tcp://127.0.0.1:4842/server/ |
The URI address of the OPC UA server. The application’s OPC UA client would connect to the OPC UA server by specifying this address. |
<PublishingInterval> |
|
Minimum time in seconds between the transmissions of subscribed data. By default, the OPC UA server agent will send transmissions immediately. |
<ServerName> |
|
Name of the OPC UA server. The default name is LiveData_OPC_UA. |
<CodeMapFile> |
|
The path of the ICCP-OPC code mapping file. The default is StandardOpcIccp.csv. See Mapping between Returned ICCP Status Names and OPC UA Status Names for Block 5 Data. |
<AppCertId> |
|
Descriptor that specifies the certificate to use from the Windows Certificate Store. No value is given since the certificate used in this example does not come from the Windows Certificate Store. |
<SecurityOpts> |
NONE |
NONE specifies the security mode. There are other security mode options available. |
<PointsPerSub> |
|
The maximum number of points per subscription. The default is 10,000. |
<MaxSubs> |
50 |
The total number of subscriptions permitted for this agent. The default is 100. |
<SubsPerSession> |
10 |
The number of subscriptions that are allowed per session. |
<MaxSessions> |
50 |
The maximum number of sessions per connection. The default is 10. |
<push_by_status> |
0 |
Enables or disables (default) OPC UA server toggling unused bits in the OPC UA status field to force otherwise unchanged data propagate. |
<AssocDownStatus> |
BadCommunicationError |
Specifies which OPC UA status code to apply to OPC UA server points when the source ICCP association is down |
#IccpUaClientAgent
The following table defines the agent in the OPC UA client VMD.
Node or Property | Value | Defines |
---|---|---|
#IccpUaClientAgent |
AgentC |
Name given to the OPC UA client agent node. |
<ServerIP> |
opc.tcp://127.0.0.1:4840/server/ |
The URI address of the OPC UA client. The application’s OPC UA server would connect to this client by specifying this address. |
<PublishingInterval> |
|
Minimum time in seconds between the transmissions of subscribed data. By default, the OPC UA server agent will send transmissions immediately. |
<ServerName> |
Test |
The name of the OPC UA server to which the OPC UA client will connect. |
<NS_URI> |
|
URI for all points under this agent. |
<CodeMapFile> |
|
The path of the ICCP-OPC UA code mapping file. The default is StandardOpcIccp.csv. See Mapping between Returned ICCP Status Names and OPC UA Status Names for Block 5 Data. |
<AppCertId> |
|
Descriptor that specifies the certificate to use from the Windows Certificate Store. |
<AuthorizedCerts> |
* |
A wildcard that specifies all certificates except for those in the Windows Certificate Store. There are additional options for specifying certificates. |
<SecurityOpts> |
NONE |
NONE specifies the security mode. There are other security mode options available. |
<PointsPerSub> |
|
The maximum number of points per subscription. The default is 10,000. |
<MaxSubs> |
50 |
The total number of subscriptions permitted for this agent. The default is 100. |
<SubsPerSession> |
10 |
The number of subscriptions that are allowed per session. |
<MaxSessions> |
50 |
The maximum number of sessions per connection. The default is 10. |
<StaleTime> |
30000 |
Number of milliseconds before data is considered stale. |
<TimeoutValidBit> |
VALID_HIGH|VALID_LOW |
Which ICCP quality validity bits to set to indicate data is stale. |
<ConnStatusBranch> |
|
OPC UA server branch for connection status variable for this OPC UA client. |
<ConnStatusNS> |
|
OPC UA server namespace for connection status variable for this OPC UA client. |
<ConnStatusOpcLabel> |
|
Alternative name to get the connection status OPC UA server variable. |
<ConnStatusServerAgent> |
AgentS |
Name of OPC UA server agent where client connection status variable is available. |
<InactiveTimeout> |
|
Timeout in milliseconds data inactivity. Change client connection status to 4 when timed out |
#Master Control
Each IFE hosts a Master Control variable that toggles the instance between active and passive modes. A remote OPC UA client can write to this Master Control variable. If an application’s OPC UA client writes 1 to a Master Control variable, the IFE instance is set to Active mode; conversely, if an application’s OPC UA client writes 0 to a Master Control variable, the IFE instance is set to Passive mode.
The following #MasterControl table defines this variable, which is exposed in the MasterControlOutForAgentS and MasterControlInForAgentS nodes.
Prototype Node or Property | Value | Defines |
---|---|---|
#MasterControl |
MasterControl |
The name of the master control variable. |
<agent> |
AgentS |
The label of the OPC UA server agent that handles communication for the nodes that have access to the Master Control variable. These are the MasterControlOutForAgentS and MasterControlInForAgentS nodes. |
<branch> |
LECSystem |
The OPC UA branch where this point is located. Leaving blank indicates no branch. |
<NS_Suffix> |
SYSTEM |
The OPC UA namespace suffix for the MasterControl node. Leaving blank indicates no NS suffix. |
#Heartbeat
The OPC UA server in each LEC Server instance has a heartbeat variable that is updated every 10 seconds. The following #Heartbeat table defines the Heartbeat variable within the OPC UA server’s HeartbeatForAgentS node.
Prototype Node or Property | Value | Defines |
---|---|---|
#Heartbeat |
Heartbeat |
The OPC UA variable name within HeartbeatForAgentS. |
<agent> |
AgentS |
The label of the OPC UA server agent that handles communication for the Heartbeat node. |
<branch> |
LECSystem |
The OPC UA branch where this point is located. Leaving blank indicates no branch. |
<NS_Suffix> |
SYSTEM |
The OPC UA namespace suffix for the Heartbeat node. Leaving blank indicates no NS suffix.. |
#HeartBeatFromApp
Each application’s OPC UA server writes to a heartbeat variable in an OPC UA client within LEC Server. The application’s OPC UA server updates the value of the variable every 10 seconds. The local OPC UA client monitors this heartbeat value, and if it is not updated in 30 seconds, the LEC Server instance will go offline.
The following #HeartBeatFromApp table defines the HeartbeatFromApp variable within the local OPC UA client.
Prototype Node Name or Property | Node Label or Property Value | Defines |
---|---|---|
#HeartbeatFromApp |
HeartbeatFromApp |
A node within the OPC UA server that gets data (a heartbeat) from an application’s OPC UA client. |
<active> |
0 |
0 indicates that the Heartbeat variable is not actively monitored, meaning that LEC Server will not revert to Passive mode even if the Heartbeat variable ceases to increment. 1 would indicate that the Heartbeat variable is actively monitored. If the Heartbeat variable is actively monitored, the LEC Server instance would revert to Passive mode if the Heartbeat variable ceases to increment. Note: This is an internal variable required by the script that is referenced in the #HeartBeatFromAppMonitor node. |
<agent> |
AgentC |
The label of the OPC UA client agent that handles communication for the HeartbeatFromApp node. |
<branch> |
LECSystem |
The OPC UA branch where this point is located. Leaving blank indicates no branch. |
<NS_Suffix> |
SYSTEM |
Specifies the OPC UA namespace suffix for the HeartbeatFromApp node. Leaving blank indicates no NS suffix. |
<type> |
<int:32> |
LEC data type of the HeartbeatFromApp node. |
<timeout> |
30000 |
Specifies the time in milliseconds that the IFE will wait for the application’s heartbeat to increment. Note: This particular value is internal to the workings of the IFE. |
<tag> |
Heartbeat |
The name of the variable that is to be passed to the HeartBeatFromAppMonitor script. |
<opc_label> |
HeartbeatFromApp |
The OPC UA variable name that contains the counter number. This variable name overrides the default name. The default name is the same as the node label. |
#ConfigControlIn
The following #ConfigControlIn table defines the input control point that a remote application’s OPC UA client can use to modify an IFE configuration. DBLoadRequest is currently the only input control point. For more information, see Loading of Batch Files.
Prototype Node Name or Property | Node Label or Property Value | Defines |
---|---|---|
#ConfigControlIn |
DBLoadRequest |
The label of the input variable that sets the path to a command file which will load batch files. Writing to this variable triggers the execution of the command file. |
<agent> |
AgentS |
The label of the OPC UA server agent that handles communication for the DBLoadRequest variable. |
<branch> |
LECSystem |
The OPC UA branch where the DBLoadRequest variable is located. Leaving blank indicates no branch. |
<NS_Suffix> |
SYSTEM |
Specifies the OPC UA namespace suffix for the DBLoadRequest variable. Leaving it blank indicates no NS suffix. |
<type> |
<v-s:-128> |
LEC data type of the DBLoadRequest variable. |
<tag> |
DBLoadRequest |
The name of the variable that is to be passed to the DBLoader script for the DBLoadRequest variable. |
#ConfigControlOut
The following table defines the output variables that the OPC UA server uses to return error message data to the OPC UA client.
Prototype Node Name or Property | Node Label/Output Variable or Property Value | Defines |
---|---|---|
#ConfigControlOut |
DBLoadCommandLine |
The label of the output variable that returns the line on which the error occurred in the command file if an error occurred. DBLoadErrorString is the label of the output variable that returns a string with the load error message if there is one. DBLoadState is the label of the output variable that indicates the state of the load. 0 is OK; 1 is failed, and -1 is busy. DBLoadRequestedCommandFile is the label of the output variable that contains the name of the command file to which DBLoadState refers. DBLoadCurrentlyLoaded is the label of the output variable containing the name of the last command file that loaded successfully; this variable is set just before DBLoadState changes to 0. If the load fails, DBLoadState is set to 1. |
<agent> |
AgentS |
The label of the OPC UA server agent that handles communication for this point and for the DBLoadErrorString, DBLoadState, DBLoadRequestedCommandFile, and DBLoadCurrentlyLoaded variables. |
<branch> |
LECSystem |
The OPC UA branch where this point and the DBLoadErrorString, DBLoadState, DBLoadRequestedCommandFile, and DBLoadCurrentlyLoaded variables are located. Leaving blank indicates no branch. |
<NS_Suffix> |
SYSTEM |
Specifies the OPC UA namespace suffix for this point as well as for the DBLoadErrorString, DBLoadState, DBLoadRequestedCommandFile, and DBLoadCurrentlyLoaded variables. Leaving blank indicates no NS suffix. |
<type> |
<v-s:-128> |
Specifies the OPC UA data type for this point and for the DBLoadErrorString, DBLoadRequestedCommandFile, and DBLoadCurrentlyLoaded variables. Note: The data type for DBLoadState is <int:32>. |
<tag> |
DBLoadRequest |
The name of the variable that is to be passed to the DBLoader script for the DBLoadCommandLine point. In addition, the DBLoadErrorString, DBLoadState, and DBLoadCurrentlyLoaded variables pass the DBLoadErrorString, DBLoadState, and DBLoadCurrentlyLoaded tags to the DBLoader script, respectively. Note: These particular values are set in points on the ConfigLoader VMD, which is internal to the workings of the IFE. |