This chapter lists the API functions that are provided by irj45.
...
Note:
There are some functions available for manipulating the provided example sii data. Usage can be found in the example 09_ecat_slave, file goal_appl.c. Usage must be enabled using the define ECAT_SSI_INIT.
appl_ccmFoeUpdateSettings
Minimal ccm firmware version: 2.0.0.0
Purpose: Configure requirements on FoE firmware update
This function allows changing required settings for FoE firmware update.
Function Prototype:
Code Block |
---|
GOAL_STATUS_T appl_ccmFoeUpdateSettings(
char *strName, /**< foe firmware filename */
uint8_t matchLength, /**< string match length */
uint32_t password, /**< foe password */
GOAL_BOOL_T flgBootstrapReq /**< bootstrap required */
); |
Example:
Code Block | ||
---|---|---|
| ||
/* enable FoE */$
res = goal_ecatCfgFoeOn(GOAL_TRUE);$
if (GOAL_RES_ERR(res)) {$
goal_logErr("failed to enable FoE support");$
}
/* enable BOOTSTRAP state */
res = goal_ecatCfgBootstrapOn(GOAL_TRUE);
if (GOAL_RES_ERR(res)) {
goal_logErr("failed to enable BOOTSTRAP support");
}
/* set settings for ccm firmware update via FoE */
res = appl_ccmFoeUpdateSettings(
"ccm.efw", /* filename beginning */
0, /* 0 -> match all characters */
0, /* password */
GOAL_TRUE); /* only update in ESM state bootstrap */
if (GOAL_RES_ERR(res)) {
goal_logErr("failed to configure FoE firmware update of CC");
return res;
} |
Remarks: For firmware update over FoE to work FoE needs to be enabled using the function goal_ecatCfgFoeOn(GOAL_TRUE). If firmware update is configured to take place on bootstrap esm state, support for this state needs to be enabled using goal_ecatCfgBootstrapOn(GOAL_TRUE). Beside that the parameters to appl_ccmFoeUpdateSettings define what required to perform the firmware update:
Parameter | Type | Function |
---|---|---|
strName | String | filename expected for firmware update |
matchLength | uint8 | number of characters required to match between the configured foe file name and the foe file name of the update process. If matchLength is zero, all bytes of strName need to match. If strName is a string of length 0, the default file name "ccm.efw”is expected. |
password | uint32 | FoE password expected to accept the firmware update |
flgBootstrapReq | bool | if enabled, firmware update will only be accepted in esm state bootstrap. |
appl_ccmEthMacAddressSet
Minimal ccm firmware version: 2.0.0.0
...
Parameter | Description |
GOAL_DD_T **ppHdl | returned GOAL dd instance handle |
uint32_t bitmaskFeatures | initial instance features to be enabled |
Table 29 goal_ddNew parameters
The parameter bitmaskFeatures is a bitmask which disables single features of GOAL dd if set:
Bit | Feature |
0 | disable HELLO request (used for device scan detection) |
1 | disable WINK command |
2 | disable GETLIST command (read list of available CM variables) |
3 | disable GETCONFIG command (read cm variables value) |
4 | disable SETCONFIG command (write cm variables value) |
5 | disable SETIP command (configure IP through GOAL dd |
Table 30 feature bitmask parameter
Function Prototype:
Code Block |
---|
GOAL_STATUS_T goal_ddNew( GOAL_DD_T **ppHdlDd, /*< DD handle */ uint32_t bitmaskFeatures /*< initial features */ ); |
...
Parameter | Description |
GOAL_DD_T *pHdl | GOAL dd instance handle |
uint32_t customerId | instance customer Id |
Table 31 goal_ddCustomerIdSet parameters
Function Prototype:
Code Block | ||
---|---|---|
| ||
GOAL_STATUS_T goal_ddCustomerIdSet( GOAL_DD_T *pHdlDd, /*< dd handle */ uint32_t cid /*< customer ID */ ); |
...
Parameter | Description |
GOAL_DD_T *pHdl | GOAL dd instance handle |
uint8_t *str | instance module name |
Table 32 goal_ddModuleNameSet parameters
Function Prototype:
Code Block |
---|
GOAL_STATUS_T goal_ddModuleNameSet( GOAL_DD_T *pHdlDd, /*< dd handle */ uint8_t *str /*< module name */ ); |
...
Parameter | Description |
GOAL_DD_T *pHdl | GOAL dd instance handle |
uint32_t bitmaskFeatures | instance features bitmask |
Table 33 goal_ddFeaturesSet parameters
For parameter description see function "goal_ddNew".
...
Parameter | Description |
GOAL_DD_T *pHdl | GOAL dd instance handle |
uint32_t bitmaskFeatures | instance features bitmask |
Table 34 goal_ddSessionFeatureActivation parameters
Note |
---|
The parameter bitmaskFeatures here is used inverted to the function for permanent configuration of the features, thus a bit set here, enabled the given feature. |
...
Filter ID | Filter Name |
0 | GOAL_DD_ACCESS_FILTER_SET_ALL |
1 | GOAL_DD_ACCESS_FILTER_SET_BASIC |
2 | GOAL_DD_ACCESS_FILTER_SET_HIDDEN |
Table 35 goal_ddFilterAdd filter sets
Filter | Filter Actions | Purpose |
0 | Full access granted to all variables | Development |
1 | Read Access to all variables of the NET module | Production Code with minimal support of the Industrial Communication Explorer |
2 | Disables read access to the web server | Production Code |
Table 36 goal_ddFilterAdd predefined filters
definition of filter GOAL_DD_ACCESS_FILTER_SET_ALL
...