From 93fec72b2044471212819ba6cfa49ec6943158fb Mon Sep 17 00:00:00 2001 From: John Talbot Date: Sat, 17 Apr 2021 11:40:22 -0400 Subject: [PATCH] docs: Add interval to documentation --- .../CMD4_AccessoryDescriptions.html | 10 +++++++--- tools/Cmd4AccDocGenerator | 16 +++++++++++++--- 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/docs/autoGenerated/CMD4_AccessoryDescriptions.html b/docs/autoGenerated/CMD4_AccessoryDescriptions.html index 6e43f1c..1a18e7b 100644 --- a/docs/autoGenerated/CMD4_AccessoryDescriptions.html +++ b/docs/autoGenerated/CMD4_AccessoryDescriptions.html @@ -564,6 +564,7 @@ State_cmd Polling Interval + Timeout StateChangeResponseTime LinkedTypes OutputConstants @@ -6481,7 +6482,9 @@

CMD4 Directives

OutputConstants < Bool > false If Cmd4 will send Strings like "TRUE" or "FALSE" instead of 0 | 1 for all Accessories RestartRecover < Bool > true If Cmd4 will use previous cached state information StatusMsg < Bool > true Cmd4 will log a Set Status Message for all Accessories. - Cmd4_Mode "Demo" | "Always" | "Polled" | "FullyPolled" Always Determines what and when characteristics are updated from the device. See Cmd4_Mode/a> in Accessory Directives for full description as it can also be set per accessory. + Cmd4_Mode "Demo" | "Always" | "Polled" | "FullyPolled" Always Determines what and when characteristics are updated from the device. See Cmd4_Mode in Accessory Directives for full description as it can also be set per accessory. + Interval Interval 60 < seconds > How long before killing the state command of all polled characteristics. See Interval in Accessory Directives for full description as it can also be set per accessory or per characteristic. + Timeout Timeout 60000 < msec > How long before killing the state command of all polled characteristics. See Timeout in Accessory Directives for full description as it can also be set per accessory or per characteristic. Definitions < Array > An Array of new Characteristic Objects. See Custom Characteristics, around line 339 for more information @@ -6508,9 +6511,10 @@

CMD4 Accessory Directives

Cmd4ModeDiagram.png StateChangeResponseTime < seconds > 60 How long to wait between a Set and Get command. - Timeout < msec > How long before killing the state command. + Interval < seconds > 60 < seconds > How long between polls of all polled characteristics. + Timeout 60000 < msec > 60000 How long before killing the state command of all polled characteristics. Polling < Bool > false If the characteristics should be polled for state change. - or [{"characteristic" < characteristic >, [ "interval": < sec >, "timeout": < msec > ] }] + or [{"characteristic" < characteristic >, [ "interval": < sec >, "timeout": < msec > ] }] The timeout and interval override any higher directive. State_cmd < State_cmd > See Description The command used to Get/Set Device characteristic State. The State_cmd represents the path to your script. Cmd4 appends the Get/Set shown.
State_cmd Get < DisplayName > < characteristic >
diff --git a/tools/Cmd4AccDocGenerator b/tools/Cmd4AccDocGenerator index db9930a..5996e3f 100755 --- a/tools/Cmd4AccDocGenerator +++ b/tools/Cmd4AccDocGenerator @@ -692,6 +692,7 @@ function addSideNavCmd4AccessoryDirectivesLinks_WithinSideNav( ) wfs( `${ constants.STATE_CMD }\n` ); wfs( `${ constants.POLLING }\n` ); wfs( `${ constants.INTERVAL }\n` ); + wfs( `${ constants.TIMEOUT }\n` ); wfs( `${ constants.STATECHANGERESPONSETIME }\n` ); wfs( `${ constants.LINKEDTYPES }\n` ); wfs( `${ constants.OUTPUTCONSTANTS }\n` ); @@ -1072,7 +1073,13 @@ function addCmd4DirectivePages_WithinMain( ) wfs( ` ${ constants.STATUSMSG } < Bool > ${ defaultStatusMsg_l } Cmd4 will log a Set Status Message for all Accessories.\n` ); // Cmd4_Mode - wfs( ` ${ constants.CMD4_MODE } "${ constants.CMD4_MODE_DEMO }" | "${ constants.CMD4_MODE_ALWAYS }" | "${ constants.CMD4_MODE_POLLED }" | "${ constants.CMD4_MODE_FULLYPOLLED }" ${ constants.CMD4_MODE_ALWAYS } Determines what and when characteristics are updated from the device. See ${ constants.CMD4_MODE }/a> in Accessory Directives for full description as it can also be set per accessory.\n` ); + wfs( ` ${ constants.CMD4_MODE } "${ constants.CMD4_MODE_DEMO }" | "${ constants.CMD4_MODE_ALWAYS }" | "${ constants.CMD4_MODE_POLLED }" | "${ constants.CMD4_MODE_FULLYPOLLED }" ${ constants.CMD4_MODE_ALWAYS } Determines what and when characteristics are updated from the device. See ${ constants.CMD4_MODE } in Accessory Directives for full description as it can also be set per accessory.\n` ); + + // Interval + wfs( ` ${ constants.INTERVAL } ${ constants.INTERVAL } ${ constants.DEFAULT_INTERVAL * .001 } < seconds > How long before killing the state command of all polled characteristics. See ${ constants.INTERVAL } in Accessory Directives for full description as it can also be set per accessory or per characteristic.\n` ); + + // Timeout + wfs( ` ${ constants.TIMEOUT } ${ constants.TIMEOUT } ${ constants.DEFAULT_TIMEOUT } < msec > How long before killing the state command of all polled characteristics. See ${ constants.TIMEOUT } in Accessory Directives for full description as it can also be set per accessory or per characteristic.\n` ); // Definitions - Custom Characteristics wfs( ` ${ constants.DEFINITIONS } < Array > An Array of new Characteristic Objects. See Custom Characteristics, around line 339 for more information\n` ); @@ -1132,13 +1139,16 @@ function addCmd4AccessoryDirectivePages_WithinMain( ) // stateChangeResponseTime wfs( `${ constants.STATECHANGERESPONSETIME } < seconds > 60 How long to wait between a Set and Get command.\n` ); + // interval + wfs( `${ constants.INTERVAL } < seconds > ${ constants.DEFAULT_INTERVAL * .001 } < seconds > How long between polls of all polled characteristics.\n` ); + // timeout - wfs( `${ constants.TIMEOUT } < msec > How long before killing the state command.\n` ); + wfs( `${ constants.TIMEOUT } ${ constants.DEFAULT_TIMEOUT } < msec > ${ constants.DEFAULT_TIMEOUT } How long before killing the state command of all polled characteristics.\n` ); // polling wfs( `${ constants.POLLING } < Bool > false If the characteristics should be polled for state change.\n` ); - wfs( ` or [{"characteristic" < characteristic >, [ "interval": < sec >, "timeout": < msec > ] }] \n` ); + wfs( ` or [{"characteristic" < characteristic >, [ "interval": < sec >, "timeout": < msec > ] }] The timeout and interval override any higher directive.\n` ); // state_cmd wfs( `${ constants.STATE_CMD } < ${ constants.STATE_CMD } > See Description The command used to Get/Set Device characteristic State.\n` );