Run clang-format and enable CI check for it (#755)
* pre-commit: Update and enable clang-format check There is newer version from clang-format so use that. We do not yet want 18 as that is little bit too new. * Format some thing by hand which clang-format "breaks" Clang-format will format some things little bit off in some cases. Format some things by hand so we get cleaner end result. * Run clang-format with ``` pre-commit run --all-files clang-format ``` We have already in previously checked places where clang-format does not make good format and ignored those (hopefully most of the things). --------- Co-authored-by: Kari Argillander <kari.argillander@fidelix.com>
This commit is contained in:
+21
-20
@@ -51,13 +51,14 @@ static void Init_Service_Handlers(void)
|
||||
|
||||
static void print_usage(const char *filename)
|
||||
{
|
||||
printf("Usage: %s pid object-type object-instance \n"
|
||||
" event-object-type event-object-instance \n"
|
||||
" sequence-number notification-class priority event-type\n"
|
||||
" [reference-bit-string status-flags message notify-type\n"
|
||||
" ack-required from-state to-state]\n"
|
||||
" [new-state status-flags message notify-type\n"
|
||||
" ack-required from-state to-state]\n",
|
||||
printf(
|
||||
"Usage: %s pid object-type object-instance \n"
|
||||
" event-object-type event-object-instance \n"
|
||||
" sequence-number notification-class priority event-type\n"
|
||||
" [reference-bit-string status-flags message notify-type\n"
|
||||
" ack-required from-state to-state]\n"
|
||||
" [new-state status-flags message notify-type\n"
|
||||
" ack-required from-state to-state]\n",
|
||||
filename);
|
||||
printf(" [--dnet][--dadr][--mac]\n");
|
||||
printf(" [--version][--help]\n");
|
||||
@@ -67,21 +68,21 @@ static void print_help(const char *filename)
|
||||
{
|
||||
printf("Send BACnet UnconfirmedEventNotification message for a device.\n");
|
||||
printf("--mac A\n"
|
||||
"Optional BACnet mac address."
|
||||
"Valid ranges are from 00 to FF (hex) for MS/TP or ARCNET,\n"
|
||||
"or an IP string with optional port number like 10.1.2.3:47808\n"
|
||||
"or an Ethernet MAC in hex like 00:21:70:7e:32:bb\n");
|
||||
"Optional BACnet mac address."
|
||||
"Valid ranges are from 00 to FF (hex) for MS/TP or ARCNET,\n"
|
||||
"or an IP string with optional port number like 10.1.2.3:47808\n"
|
||||
"or an Ethernet MAC in hex like 00:21:70:7e:32:bb\n");
|
||||
printf("\n");
|
||||
printf("--dnet N\n"
|
||||
"Optional BACnet network number N for directed requests.\n"
|
||||
"Valid range is from 0 to 65535 where 0 is the local connection\n"
|
||||
"and 65535 is network broadcast.\n");
|
||||
"Optional BACnet network number N for directed requests.\n"
|
||||
"Valid range is from 0 to 65535 where 0 is the local connection\n"
|
||||
"and 65535 is network broadcast.\n");
|
||||
printf("\n");
|
||||
printf("--dadr A\n"
|
||||
"Optional BACnet mac address on the destination BACnet network\n"
|
||||
"Valid ranges are from 00 to FF (hex) for MS/TP or ARCNET,\n"
|
||||
"or an IP string with optional port number like 10.1.2.3:47808\n"
|
||||
"or an Ethernet MAC in hex like 00:21:70:7e:32:bb\n");
|
||||
"Optional BACnet mac address on the destination BACnet network\n"
|
||||
"Valid ranges are from 00 to FF (hex) for MS/TP or ARCNET,\n"
|
||||
"or an IP string with optional port number like 10.1.2.3:47808\n"
|
||||
"or an Ethernet MAC in hex like 00:21:70:7e:32:bb\n");
|
||||
printf("\n");
|
||||
(void)filename;
|
||||
}
|
||||
@@ -296,8 +297,8 @@ int main(int argc, char *argv[])
|
||||
} else if (event_data.eventType == EVENT_COMMAND_FAILURE) {
|
||||
} else if (event_data.eventType == EVENT_FLOATING_LIMIT) {
|
||||
} else if (event_data.eventType == EVENT_OUT_OF_RANGE) {
|
||||
} else if (event_data.eventType ==
|
||||
EVENT_CHANGE_OF_LIFE_SAFETY) {
|
||||
} else if (
|
||||
event_data.eventType == EVENT_CHANGE_OF_LIFE_SAFETY) {
|
||||
} else if (event_data.eventType == EVENT_EXTENDED) {
|
||||
} else if (event_data.eventType == EVENT_BUFFER_READY) {
|
||||
} else if (event_data.eventType == EVENT_UNSIGNED_RANGE) {
|
||||
|
||||
Reference in New Issue
Block a user