Standardized the comments and indentation using the comment.sh and indent.sh scripts.
This commit is contained in:
@@ -162,72 +162,73 @@ int main(int argc, char *argv[])
|
||||
printf("Usage: %s device-instance object-type object-instance "
|
||||
"property tag value [priority] [index]\r\n",
|
||||
filename_remove_path(argv[0]));
|
||||
if ((argc > 1) && (strcmp(argv[1],"--help") == 0)) {
|
||||
printf("device-instance:\r\n"
|
||||
"BACnet Device Object Instance number that you are trying to\r\n"
|
||||
"communicate to. This number will be used to try and bind with\r\n"
|
||||
"the device using Who-Is and I-Am services. For example, if you were\r\n"
|
||||
"writing to Device Object 123, the device-instance would be 123.\r\n"
|
||||
"\r\n"
|
||||
"object-type:\r\n"
|
||||
"The object type is the integer value of the enumeration\r\n"
|
||||
"BACNET_OBJECT_TYPE in bacenum.h. It is the object that you are\r\n"
|
||||
"writing to. For example if you were writing to Analog Output 2, \r\n"
|
||||
"the object-type would be 1.\r\n"
|
||||
"\r\n"
|
||||
"object-instance:\r\n"
|
||||
"This is the object instance number of the object that you are \r\n"
|
||||
"writing to. For example, if you were writing to Analog Output 2, \r\n"
|
||||
"the object-instance would be 2.\r\n"
|
||||
"\r\n"
|
||||
"property:\r\n"
|
||||
"The property is an integer value of the enumeration \r\n"
|
||||
"BACNET_PROPERTY_ID in bacenum.h. It is the property you are \r\n"
|
||||
"writing to. For example, if you were writing to the Present Value\r\n"
|
||||
"property, you would use 85 as the property.\r\n"
|
||||
"\r\n"
|
||||
"tag:\r\n"
|
||||
"Tag is the integer value of the enumeration BACNET_APPLICATION_TAG \r\n"
|
||||
"in bacenum.h. It is the data type of the value that you are\r\n"
|
||||
"writing. For example, if you were writing a REAL value, you would \r\n"
|
||||
"use a tag of 4."
|
||||
"\r\n"
|
||||
"value:\r\n"
|
||||
"The value is an ASCII representation of some type of data that you\r\n"
|
||||
"are writing. It is encoded using the tag information provided. For\r\n"
|
||||
"example, if you were writing a REAL value of 100.0, you would use \r\n"
|
||||
"100.0 as the value.\r\n"
|
||||
"\r\n"
|
||||
"[priority]:\r\n"
|
||||
"This optional parameter is used for setting the priority of the\r\n"
|
||||
"write. If no priority is given, none is sent, and the BACnet \r\n"
|
||||
"standard requires that the value is written at the lowest \r\n"
|
||||
"priority (16) if the object property supports priorities.\r\n"
|
||||
"\r\n"
|
||||
"[index]\r\n"
|
||||
"This optional integer parameter is the index number of an array.\r\n"
|
||||
"If the property is an array, individual elements can be written\r\n"
|
||||
"to if supported.\r\n"
|
||||
"\r\n"
|
||||
"Here is a brief overview of BACnet property and tags:\r\n"
|
||||
"Certain properties are expected to be written with certain \r\n"
|
||||
"application tags, so you probably need to know which ones to use\r\n"
|
||||
"with each property of each object. It is almost safe to say that\r\n"
|
||||
"given a property and an object and a table, the tag could be looked\r\n"
|
||||
"up automatically. There may be a few exceptions to this, such as\r\n"
|
||||
"the Any property type in the schedule object and the Present Value\r\n"
|
||||
"accepting REAL, BOOLEAN, NULL, etc. Perhaps it would be simpler for\r\n"
|
||||
"the demo to use this kind of table - but I also wanted to be able\r\n"
|
||||
"to do negative testing by passing the wrong tag and have the server\r\n"
|
||||
"return a reject message.\r\n"
|
||||
"\r\n"
|
||||
"Example:\r\n"
|
||||
"If you want send a 100 to the Present-Value in the Analog Output\r\n"
|
||||
"at priority 16, you could send the following command:\r\n"
|
||||
"%s 123 1 0 85 4 100\r\n"
|
||||
"You could also send a relinquish command:\r\n"
|
||||
"%s 123 1 0 85 0 0\r\n",
|
||||
filename_remove_path(argv[0]), filename_remove_path(argv[0]));
|
||||
if ((argc > 1) && (strcmp(argv[1], "--help") == 0)) {
|
||||
printf("device-instance:\r\n"
|
||||
"BACnet Device Object Instance number that you are trying to\r\n"
|
||||
"communicate to. This number will be used to try and bind with\r\n"
|
||||
"the device using Who-Is and I-Am services. For example, if you were\r\n"
|
||||
"writing to Device Object 123, the device-instance would be 123.\r\n"
|
||||
"\r\n"
|
||||
"object-type:\r\n"
|
||||
"The object type is the integer value of the enumeration\r\n"
|
||||
"BACNET_OBJECT_TYPE in bacenum.h. It is the object that you are\r\n"
|
||||
"writing to. For example if you were writing to Analog Output 2, \r\n"
|
||||
"the object-type would be 1.\r\n"
|
||||
"\r\n"
|
||||
"object-instance:\r\n"
|
||||
"This is the object instance number of the object that you are \r\n"
|
||||
"writing to. For example, if you were writing to Analog Output 2, \r\n"
|
||||
"the object-instance would be 2.\r\n"
|
||||
"\r\n"
|
||||
"property:\r\n"
|
||||
"The property is an integer value of the enumeration \r\n"
|
||||
"BACNET_PROPERTY_ID in bacenum.h. It is the property you are \r\n"
|
||||
"writing to. For example, if you were writing to the Present Value\r\n"
|
||||
"property, you would use 85 as the property.\r\n"
|
||||
"\r\n"
|
||||
"tag:\r\n"
|
||||
"Tag is the integer value of the enumeration BACNET_APPLICATION_TAG \r\n"
|
||||
"in bacenum.h. It is the data type of the value that you are\r\n"
|
||||
"writing. For example, if you were writing a REAL value, you would \r\n"
|
||||
"use a tag of 4."
|
||||
"\r\n"
|
||||
"value:\r\n"
|
||||
"The value is an ASCII representation of some type of data that you\r\n"
|
||||
"are writing. It is encoded using the tag information provided. For\r\n"
|
||||
"example, if you were writing a REAL value of 100.0, you would use \r\n"
|
||||
"100.0 as the value.\r\n"
|
||||
"\r\n"
|
||||
"[priority]:\r\n"
|
||||
"This optional parameter is used for setting the priority of the\r\n"
|
||||
"write. If no priority is given, none is sent, and the BACnet \r\n"
|
||||
"standard requires that the value is written at the lowest \r\n"
|
||||
"priority (16) if the object property supports priorities.\r\n"
|
||||
"\r\n"
|
||||
"[index]\r\n"
|
||||
"This optional integer parameter is the index number of an array.\r\n"
|
||||
"If the property is an array, individual elements can be written\r\n"
|
||||
"to if supported.\r\n"
|
||||
"\r\n"
|
||||
"Here is a brief overview of BACnet property and tags:\r\n"
|
||||
"Certain properties are expected to be written with certain \r\n"
|
||||
"application tags, so you probably need to know which ones to use\r\n"
|
||||
"with each property of each object. It is almost safe to say that\r\n"
|
||||
"given a property and an object and a table, the tag could be looked\r\n"
|
||||
"up automatically. There may be a few exceptions to this, such as\r\n"
|
||||
"the Any property type in the schedule object and the Present Value\r\n"
|
||||
"accepting REAL, BOOLEAN, NULL, etc. Perhaps it would be simpler for\r\n"
|
||||
"the demo to use this kind of table - but I also wanted to be able\r\n"
|
||||
"to do negative testing by passing the wrong tag and have the server\r\n"
|
||||
"return a reject message.\r\n"
|
||||
"\r\n"
|
||||
"Example:\r\n"
|
||||
"If you want send a 100 to the Present-Value in the Analog Output\r\n"
|
||||
"at priority 16, you could send the following command:\r\n"
|
||||
"%s 123 1 0 85 4 100\r\n"
|
||||
"You could also send a relinquish command:\r\n"
|
||||
"%s 123 1 0 85 0 0\r\n",
|
||||
filename_remove_path(argv[0]),
|
||||
filename_remove_path(argv[0]));
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user