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:
+44
-49
@@ -20,59 +20,54 @@ extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
/* return the status */
|
||||
BACNET_STACK_EXPORT
|
||||
BACNET_COMMUNICATION_ENABLE_DISABLE dcc_enable_status(
|
||||
void);
|
||||
BACNET_STACK_EXPORT
|
||||
bool dcc_communication_enabled(
|
||||
void);
|
||||
BACNET_STACK_EXPORT
|
||||
bool dcc_communication_disabled(
|
||||
void);
|
||||
BACNET_STACK_EXPORT
|
||||
bool dcc_communication_initiation_disabled(
|
||||
void);
|
||||
BACNET_STACK_EXPORT
|
||||
BACNET_COMMUNICATION_ENABLE_DISABLE dcc_enable_status(void);
|
||||
BACNET_STACK_EXPORT
|
||||
bool dcc_communication_enabled(void);
|
||||
BACNET_STACK_EXPORT
|
||||
bool dcc_communication_disabled(void);
|
||||
BACNET_STACK_EXPORT
|
||||
bool dcc_communication_initiation_disabled(void);
|
||||
/* return the time */
|
||||
BACNET_STACK_EXPORT
|
||||
uint32_t dcc_duration_seconds(
|
||||
void);
|
||||
BACNET_STACK_EXPORT
|
||||
uint32_t dcc_duration_seconds(void);
|
||||
/* called every second or so. If more than one second,
|
||||
then seconds should be the number of seconds to tick away */
|
||||
BACNET_STACK_EXPORT
|
||||
void dcc_timer_seconds(
|
||||
uint32_t seconds);
|
||||
BACNET_STACK_EXPORT
|
||||
void dcc_timer_seconds(uint32_t seconds);
|
||||
/* setup the communication values */
|
||||
BACNET_STACK_EXPORT
|
||||
bool dcc_set_status_duration(
|
||||
BACNET_COMMUNICATION_ENABLE_DISABLE status,
|
||||
uint16_t minutes);
|
||||
BACNET_STACK_EXPORT
|
||||
bool dcc_set_status_duration(
|
||||
BACNET_COMMUNICATION_ENABLE_DISABLE status, uint16_t minutes);
|
||||
|
||||
BACNET_STACK_EXPORT
|
||||
int dcc_apdu_encode(uint8_t *apdu,
|
||||
uint16_t timeDuration,
|
||||
BACNET_COMMUNICATION_ENABLE_DISABLE enable_disable,
|
||||
const BACNET_CHARACTER_STRING *password);
|
||||
BACNET_STACK_EXPORT
|
||||
size_t dcc_service_request_encode(uint8_t *apdu,
|
||||
size_t apdu_size,
|
||||
uint16_t timeDuration,
|
||||
BACNET_COMMUNICATION_ENABLE_DISABLE enable_disable,
|
||||
const BACNET_CHARACTER_STRING *password);
|
||||
BACNET_STACK_EXPORT
|
||||
int dcc_encode_apdu(
|
||||
uint8_t * apdu,
|
||||
uint8_t invoke_id,
|
||||
uint16_t timeDuration,
|
||||
BACNET_COMMUNICATION_ENABLE_DISABLE enable_disable,
|
||||
const BACNET_CHARACTER_STRING * password);
|
||||
BACNET_STACK_EXPORT
|
||||
int dcc_apdu_encode(
|
||||
uint8_t *apdu,
|
||||
uint16_t timeDuration,
|
||||
BACNET_COMMUNICATION_ENABLE_DISABLE enable_disable,
|
||||
const BACNET_CHARACTER_STRING *password);
|
||||
BACNET_STACK_EXPORT
|
||||
size_t dcc_service_request_encode(
|
||||
uint8_t *apdu,
|
||||
size_t apdu_size,
|
||||
uint16_t timeDuration,
|
||||
BACNET_COMMUNICATION_ENABLE_DISABLE enable_disable,
|
||||
const BACNET_CHARACTER_STRING *password);
|
||||
BACNET_STACK_EXPORT
|
||||
int dcc_encode_apdu(
|
||||
uint8_t *apdu,
|
||||
uint8_t invoke_id,
|
||||
uint16_t timeDuration,
|
||||
BACNET_COMMUNICATION_ENABLE_DISABLE enable_disable,
|
||||
const BACNET_CHARACTER_STRING *password);
|
||||
|
||||
BACNET_STACK_EXPORT
|
||||
int dcc_decode_service_request(
|
||||
const uint8_t * apdu,
|
||||
unsigned apdu_len,
|
||||
uint16_t * timeDuration,
|
||||
BACNET_COMMUNICATION_ENABLE_DISABLE * enable_disable,
|
||||
BACNET_CHARACTER_STRING * password);
|
||||
BACNET_STACK_EXPORT
|
||||
int dcc_decode_service_request(
|
||||
const uint8_t *apdu,
|
||||
unsigned apdu_len,
|
||||
uint16_t *timeDuration,
|
||||
BACNET_COMMUNICATION_ENABLE_DISABLE *enable_disable,
|
||||
BACNET_CHARACTER_STRING *password);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
@@ -93,8 +88,8 @@ extern "C" {
|
||||
* instruct a remote device to stop initiating and optionally stop responding
|
||||
* to all APDUs (except DeviceCommunicationControl or, if supported,
|
||||
* ReinitializeDevice) on the communication network or internetwork for a
|
||||
* specified duration of time. This service is primarily used by a human operator
|
||||
* for diagnostic purposes. A password may be required from the client
|
||||
* specified duration of time. This service is primarily used by a human
|
||||
* operator for diagnostic purposes. A password may be required from the client
|
||||
* BACnet-user prior to executing the service. The time duration may be set to
|
||||
* "indefinite," meaning communication must be re-enabled by a
|
||||
* DeviceCommunicationControl or, if supported, ReinitializeDevice service,
|
||||
|
||||
Reference in New Issue
Block a user