fwConfigs
8.4.3
|
Functions | |
void | _fwPeriphAddressBACnet_set (string dpe, dyn_anytype addressConfig, dyn_string &exceptionInfo) |
Internal function to setup the BACnet addressing. More... | |
void | _fwPeriphAddressBACNET_set (string dpe, dyn_anytype addressConfig, dyn_string &exceptionInfo) |
void | _fwPeriphAddressBACnet_get (string dpe, dyn_anytype &addressConfig, bool &isActive, dyn_string &exceptionInfo) |
Retrieve configuration from _address config for BACnet. More... | |
void | _fwPeriphAddressBACNET_get (string dpe, dyn_anytype &addressConfig, bool &isActive, dyn_string &exceptionInfo) |
_fwPeriphAddressBACnet_delete (string dpe, dyn_string &exceptionInfo) | |
Internal function to cleanup before deleting the BACnet _address and _distrib configs TODO: create function body. More... | |
void | _fwPeriphAddressBACnet_check (dyn_anytype &addressConfig, dyn_string &exceptionInfo) |
Function to check and correct BACnet address configuration parameters before attempting to save them to the DP element. More... | |
void | _fwPeriphAddressBACNET_check (dyn_anytype &addressConfig, dyn_string &exceptionInfo) |
bool | _fwPeriphAddressBACnet_isDataTypeValid (string dataType) |
bool | _fwPeriphAddressBACnet_isReferenceValid (string reference) |
dyn_string | _fwPeriphAddressBACnet_explodeReference (string reference) |
bool | _fwPeriphAddressBACnet_isDeviceValid (string device) |
bool | _fwPeriphAddressBACnet_isObjectIdValid (string objectId) |
bool | _fwPeriphAddressBACnet_isPropertyValid (string object, string property) |
bool | _fwPeriphAddressBACnet_isIndexValid (string index) |
void | _fwPeriphAddressBACnet_showTransformationTypes () |
void | _fwPeriphAddressBACnet_showObjectTypes () |
void | _fwPeriphAddressBACnet_showDevices (string dpe) |
void | _fwPeriphAddressBACnet_showPollingGroups (string dpe) |
void | _fwPeriphAddressBACnet_getModes (int addressMode, int &directionMode, int &receiveMode) |
void | _fwPeriphAddressBACnet_showDeviceAddress (string dp) |
void | _fwPeriphAddressBACnet_showObjectProperties (string objectType) |
void | _fwPeriphAddressBACnet_setIOMode (int directionMode, int receiveMode) |
Variables | |
const int | fwPeriphAddress_BACNET_REF_MIN_ELEM_NO = 4 |
Separator used in reference _address field. | |
const int | fwPeriphAddress_BACNET_REF_MAX_ELEM_NO = 5 |
Minimum number of elements in reference _address field. | |
const int | fwPeriphAddress_BACNET_REF_DEV_IDX = 1 |
Maximum number of elements in reference _address field. | |
const int | fwPeriphAddress_BACNET_REF_OBJ_TYPE_IDX = 2 |
Index for device name in peripheral address. | |
const int | fwPeriphAddress_BACNET_REF_OBJ_ID_IDX = 3 |
Index for object type in peripheral address. | |
const int | fwPeriphAddress_BACNET_REF_PROP_IDX = 4 |
Index for object id in peripheral address. | |
const int | fwPeriphAddress_BACNET_REF_IDX_IDX = 5 |
Index for property in peripheral address. | |
const int | fwPeriphAddress_BACNET_TYPE_DEFAULT = 800 |
Index for property's index in peripheral address. | |
const int | fwPeriphAddress_BACNET_TYPE_BOOL = 801 |
Default. | |
const int | fwPeriphAddress_BACNET_TYPE_UINT = 802 |
Boolean. | |
const int | fwPeriphAddress_BACNET_TYPE_INT = 803 |
Unsigned Integer. | |
const int | fwPeriphAddress_BACNET_TYPE_REAL = 804 |
Signed Integer. | |
const int | fwPeriphAddress_BACNET_TYPE_DOUBLE = 805 |
Real. | |
const int | fwPeriphAddress_BACNET_TYPE_ENUM = 809 |
Double. | |
const dyn_int | fwPeriphAddress_BACNET_TYPES |
Enumerated. | |
Functions to set _address config for datapoint for BACnet driver.
Naming: when possible names used in WinCC OA help are used (e.g. "reference" is preferred over "address"). FW_PARAMETER_FIELD_AAABBB constants are used, not the fwPeriphAddress_AAABBB (who know which one is correct?). TODO: it would be better to switch to fwPeriphAddress_AAABBB as everybody else is using it.
Note that config identifier is "BACnet", but the driver uses "BACNET", in some cases it might cause confusion, that's why there are wrapper functions using "BACNET" have been added. Probably it was better to use "BACNET" from the start even though it's not correct...
Initial code was written based on WinCC OA help file on BACnet and _address config entry. Other things were taken from BACnet examples (BACnet_Samples.dpl in dplist directory of BACnet directory in WinCC OA installation, look for "PeriphAddrMain"). Also panels:
Table for _datatype. Help only defines 800, but these values were used in various places: 800 default 801 Boolean 802 UnsignedInteger 803 SignedInteger 804 Real 805 Double 809 Enumerated 806 skipped, see bacnetDrvPara.ctl, line 740 Valid IDs: 800-899.
Code based on other fwPeriphAddressAAABB.ctl files.
Note that setting _address is not enough to make it work appriopriate BACnet device datapoint has to exist (_BacnetDevice).
Changelog (put only important stuff here):
void _fwPeriphAddressBACnet_set | ( | string | dpe, |
dyn_anytype | addressConfig, | ||
dyn_string & | exceptionInfo | ||
) |
Internal function to setup the BACnet addressing.
dpe | Datapoint element to act on |
addressConfig | Address object is passed here: |
exceptionInfo | Details of any errors are returned here |
void _fwPeriphAddressBACNET_set | ( | string | dpe, |
dyn_anytype | addressConfig, | ||
dyn_string & | exceptionInfo | ||
) |
This is to fix problem with different config type identifier ("BACnet") and different driver identifier ("BACNET"). This function is just a wrapper around "proper" function. Proper BACnet name is "BACnet", but for whatever reason driver uses (and some of our panels use this information /fwPeriphAddress.pnl/) "BACNET".
void _fwPeriphAddressBACnet_get | ( | string | dpe, |
dyn_anytype & | addressConfig, | ||
bool & | isActive, | ||
dyn_string & | exceptionInfo | ||
) |
Retrieve configuration from _address config for BACnet.
dpe | Datapoint element to read from |
addressConfig | Address object is returned here (configParameters). |
isActive | TRUE if address config is active, else FALSE |
exceptionInfo | Details of any errors are returned here |
void _fwPeriphAddressBACNET_get | ( | string | dpe, |
dyn_anytype & | addressConfig, | ||
bool & | isActive, | ||
dyn_string & | exceptionInfo | ||
) |
This is to fix problem with different config type identifier ("BACnet") and different driver identifier ("BACNET"). This function is just a wrapper around "proper" function. Proper BACnet name is "BACnet", but for whatever reason driver uses (and some of our panels use this information /fwPeriphAddress.pnl/) "BACNET".
_fwPeriphAddressBACnet_delete | ( | string | dpe, |
dyn_string & | exceptionInfo | ||
) |
Internal function to cleanup before deleting the BACnet _address and _distrib configs TODO: create function body.
dpe | Datapoint element to read from |
exceptionInfo | Details of any errors are returned here |
void _fwPeriphAddressBACnet_check | ( | dyn_anytype & | addressConfig, |
dyn_string & | exceptionInfo | ||
) |
Function to check and correct BACnet address configuration parameters before attempting to save them to the DP element.
Note: in other cases this function is public (no "_" prefix), but there's no reason why to make it private.
addressConfig | The address configuration object is passed here. In some cases, an amended (fixed) version may be returned here |
exceptionInfo | Details of errors in the address configuration are returned here |
void _fwPeriphAddressBACNET_check | ( | dyn_anytype & | addressConfig, |
dyn_string & | exceptionInfo | ||
) |
This is to fix problem with different config type identifier ("BACnet") and different driver identifier ("BACNET"). This function is just a wrapper around "proper" function. Proper BACnet name is "BACnet", but for whatever reason driver uses (and some of our panels use this information /fwPeriphAddress.pnl/) "BACNET".
bool _fwPeriphAddressBACnet_isDataTypeValid | ( | string | dataType | ) |
Validate datatype.
dataType | (string) IN datatype (as string), ex. "800". |
bool _fwPeriphAddressBACnet_isReferenceValid | ( | string | reference | ) |
Validate BACnet address reference.
Example reference: "Device_6789.AnalogInput.1.Min_Pres_Value" or: "Device_6789.BinaryValue.3.Reliability.2". Note: last element is optional.
<Device>.<Object_Type>.<Object_Id>.<Property>.<Index /optional/>
reference | (string) IN BACnet address reference |
dyn_string _fwPeriphAddressBACnet_explodeReference | ( | string | reference | ) |
Explodes string representing BACnet reference. *
reference | (string) IN BACnet reference string, ex. " |
bool _fwPeriphAddressBACnet_isDeviceValid | ( | string | device | ) |
Check if a given BACnet device exists in the configuration.
This function simply check if a datapoint of a given name and type "_BacnetDevice" exists.
TODO: stub, returns always true
device | (string) IN BACnet device name |
bool _fwPeriphAddressBACnet_isObjectIdValid | ( | string | objectId | ) |
Check if BACnet object ID is valid for _reference element.
Note, this does not check if an object id really exists in the device, only if it is correct, i.e. a number.
objectId | (string) IN BACnet object id |
bool _fwPeriphAddressBACnet_isPropertyValid | ( | string | object, |
string | property | ||
) |
Check if BACnet object's property is valid for _reference element.
Note1: that cat file that is being used is not the same cat file that is used to store translated messages ("msg" directory). Note2: code based on one of the WinCC OA BACnet libraries.
property | (string) IN BACnet object's property |
bool _fwPeriphAddressBACnet_isIndexValid | ( | string | index | ) |
Check if given BACnet object's property index is valid.
index | (string) IN object's property index |
void _fwPeriphAddressBACnet_showTransformationTypes | ( | ) |
This function shows BACnet transformation types in 'transformation_BACnet' combobox.
void _fwPeriphAddressBACnet_showObjectTypes | ( | ) |
This function finds BACnet Object Types and shows in the 'objectType_BACnet' combobox.
void _fwPeriphAddressBACnet_showDevices | ( | string | dpe | ) |
This function finds BACnet devices available for given DPE and shows in the 'device_BACnet' combobox.
dpe | Data point element for which available BACnet devices should be found |
void _fwPeriphAddressBACnet_showPollingGroups | ( | string | dpe | ) |
This function finds the polling groups stored in dp and shows in the 'pollGroupName_BACnet' combobox.
dpe | Data point element with device name |
void _fwPeriphAddressBACnet_getModes | ( | int | addressMode, |
int & | directionMode, | ||
int & | receiveMode | ||
) |
This function reads Direction and Receive Mode flags from the "_address.._mode" property
addressMode | value of "_address.._mode" property of dpe |
directionMode | returned Direction flag |
receiveMode | returned Receive Mode flag |
void _fwPeriphAddressBACnet_showDeviceAddress | ( | string | dp | ) |
This function reads the IP address and port of given BACnet server (device) and shows them.
dp | BACnet device data point |
void _fwPeriphAddressBACnet_showObjectProperties | ( | string | objectType | ) |
This function finds list of Properties for given BACnet Object Types and shows them in the property_BACnet combobox.
objectType | Object Type for which list of properties has to be found |
void _fwPeriphAddressBACnet_setIOMode | ( | int | directionMode, |
int | receiveMode | ||
) |
This function controls enabling of objects in Receive Mode and Polling Group frames on the panel depending on the choosen Direction and Receive Mode.
directionMode | direction mode (Output, Input, Input/Output) |
receiveMode | receive mode (Unsolicited, Polling, Single Query, Alarm) |