Skip to content

Commit

Permalink
docs: Add interval to documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
ztalbot2000 committed Apr 17, 2021
1 parent 685bef5 commit 93fec72
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 6 deletions.
10 changes: 7 additions & 3 deletions docs/autoGenerated/CMD4_AccessoryDescriptions.html
Original file line number Diff line number Diff line change
Expand Up @@ -564,6 +564,7 @@
<a href="#State_cmd" onclick="toggleVisibility( 'AccessoryDirectives');">State_cmd</a>
<a href="#Polling" onclick="toggleVisibility( 'AccessoryDirectives');">Polling</a>
<a href="#Interval" onclick="toggleVisibility( 'AccessoryDirectives');">Interval</a>
<a href="#Timeout" onclick="toggleVisibility( 'AccessoryDirectives');">Timeout</a>
<a href="#StateChangeResponseTime" onclick="toggleVisibility( 'AccessoryDirectives');">StateChangeResponseTime</a>
<a href="#LinkedTypes" onclick="toggleVisibility( 'AccessoryDirectives');">LinkedTypes</a>
<a href="#OutputConstants" onclick="toggleVisibility( 'AccessoryDirectives');">OutputConstants</a>
Expand Down Expand Up @@ -6481,7 +6482,9 @@ <h2>CMD4 Directives</h2>
<TR ALIGN="left"><TD><a name="OutputConstants_D">OutputConstants</a><TD> < Bool > <TD> false <TD> If Cmd4 will send Strings like "TRUE" or "FALSE" instead of 0 | 1 for all Accessories</TR>
<TR ALIGN="left"><TD><a name="RestartRecover_D"> RestartRecover</a><TD> < Bool > <TD> true <TD> If Cmd4 will use previous cached state information </TR>
<TR ALIGN="left"><TD><a name="StatusMsg_D"> StatusMsg</a><TD> < Bool > <TD> true <TD> Cmd4 will log a Set Status Message for all Accessories.</TR>
<TR ALIGN="left"><TD><a name="Cmd4_Mode"> Cmd4_Mode</a><TD> "Demo" | "Always" | "Polled" | "FullyPolled" <TD> Always <TD> Determines what and when characteristics are updated from the device. See <a href="#Cmd4_Mode" onclick="toggleVisibility( 'AccessoryDirectives');">Cmd4_Mode/a> in Accessory Directives for full description as it can also be set per accessory.</TR>
<TR ALIGN="left"><TD><a name="Cmd4_Mode"> Cmd4_Mode</a><TD> "Demo" | "Always" | "Polled" | "FullyPolled" <TD> Always <TD> Determines what and when characteristics are updated from the device. See <a href="#Cmd4_Mode" onclick="toggleVisibility( 'AccessoryDirectives');">Cmd4_Mode</a> in Accessory Directives for full description as it can also be set per accessory.</TR>
<TR ALIGN="left"><TD><a name="Interval"> Interval</a><TD> Interval <TD> 60 < seconds > <TD> How long before killing the state command of all polled characteristics. See <a href="#Interval" onclick="toggleVisibility( 'AccessoryDirectives');">Interval</a> in Accessory Directives for full description as it can also be set per accessory or per characteristic.</TR>
<TR ALIGN="left"><TD><a name="Timeout"> Timeout</a><TD> Timeout <TD> 60000 < msec > <TD> How long before killing the state command of all polled characteristics. See <a href="#Timeout" onclick="toggleVisibility( 'AccessoryDirectives');">Timeout</a> in Accessory Directives for full description as it can also be set per accessory or per characteristic.</TR>
<TR ALIGN="left"><TD><a name="Definitions_D"> Definitions</a><TD> < Array > <TD> <TD> An Array of new Characteristic Objects. See <a href="#CUSTOM_CHARACTERISTICS" onclick="toggleVisibility( 'CustomCharacteristics');">Custom Characteristics, around line 339</a> for more information</TR>
</TABLE>
</DIV> <!-- main -->
Expand All @@ -6508,9 +6511,10 @@ <h2><a name="CMD4 Accessory Directives">CMD4 Accessory Directives</a></h2>
<img src="../images/Cmd4ModeDiagram.png" alt="Cmd4ModeDiagram.png">
</TR>
<TR ALIGN="left"><TD><a name="StateChangeResponseTime">StateChangeResponseTime</a><TD> < seconds > <TD> 60 <TD> How long to wait between a Set and Get command.</TR>
<TR ALIGN="left"><TD><a name="Timeout">Timeout</a><TD> < msec > <TD> <TD> How long before killing the state command.</TR>
<TR ALIGN="left"><TD><a name="Interval">Interval</a><TD> < seconds > <TD> 60 < seconds > <TD> How long between polls of all polled characteristics.</TR>
<TR ALIGN="left"><TD><a name="Timeout">Timeout</a><TD> 60000 < msec > <TD> 60000 <TD> How long before killing the state command of all polled characteristics.</TR>
<TR ALIGN="left"><TD><a name="Polling">Polling</a><TD> < Bool > <TD> false <TD> If the characteristics should be polled for state change.</TR>
<TR><TD><TD COLSPAN=3> or [{"characteristic" < characteristic >, [ "interval": < sec >, "timeout": < msec > ] }] </TR>
<TR><TD><TD COLSPAN=3> or [{"characteristic" < characteristic >, [ "interval": < sec >, "timeout": < msec > ] }] The timeout and interval override any higher directive.</TR>
<TR ALIGN="left"><TD><a name="State_cmd">State_cmd</a><TD> < State_cmd > <TD> See Description <TD> The command used to Get/Set Device characteristic State.</TR>
<TR><TD COLSPAN="4">The State_cmd represents the path to your script. Cmd4 appends the Get/Set shown.<BR>
State_cmd Get < DisplayName > < characteristic ><BR>
Expand Down
16 changes: 13 additions & 3 deletions tools/Cmd4AccDocGenerator
Original file line number Diff line number Diff line change
Expand Up @@ -692,6 +692,7 @@ function addSideNavCmd4AccessoryDirectivesLinks_WithinSideNav( )
wfs( `<a href="#${ constants.STATE_CMD }" onclick="toggleVisibility( 'AccessoryDirectives');">${ constants.STATE_CMD }</a>\n` );
wfs( `<a href="#${ constants.POLLING }" onclick="toggleVisibility( 'AccessoryDirectives');">${ constants.POLLING }</a>\n` );
wfs( `<a href="#${ constants.INTERVAL }" onclick="toggleVisibility( 'AccessoryDirectives');">${ constants.INTERVAL }</a>\n` );
wfs( `<a href="#${ constants.TIMEOUT }" onclick="toggleVisibility( 'AccessoryDirectives');">${ constants.TIMEOUT }</a>\n` );
wfs( `<a href="#${ constants.STATECHANGERESPONSETIME }" onclick="toggleVisibility( 'AccessoryDirectives');">${ constants.STATECHANGERESPONSETIME }</a>\n` );
wfs( `<a href="#${ constants.LINKEDTYPES }" onclick="toggleVisibility( 'AccessoryDirectives');">${ constants.LINKEDTYPES }</a>\n` );
wfs( `<a href="#${ constants.OUTPUTCONSTANTS }" onclick="toggleVisibility( 'AccessoryDirectives');">${ constants.OUTPUTCONSTANTS }</a>\n` );
Expand Down Expand Up @@ -1072,7 +1073,13 @@ function addCmd4DirectivePages_WithinMain( )
wfs( `<TR ALIGN="left"><TD><a name="${ constants.STATUSMSG }_D"> ${ constants.STATUSMSG }</a><TD> < Bool > <TD> ${ defaultStatusMsg_l } <TD> Cmd4 will log a Set Status Message for all Accessories.</TR>\n` );

// Cmd4_Mode
wfs( `<TR ALIGN="left"><TD><a name="${ constants.CMD4_MODE }"> ${ constants.CMD4_MODE }</a><TD> "${ constants.CMD4_MODE_DEMO }" | "${ constants.CMD4_MODE_ALWAYS }" | "${ constants.CMD4_MODE_POLLED }" | "${ constants.CMD4_MODE_FULLYPOLLED }" <TD> ${ constants.CMD4_MODE_ALWAYS } <TD> Determines what and when characteristics are updated from the device. See <a href="#${ constants.CMD4_MODE }" onclick="toggleVisibility( 'AccessoryDirectives');">${ constants.CMD4_MODE }/a> in Accessory Directives for full description as it can also be set per accessory.</TR>\n` );
wfs( `<TR ALIGN="left"><TD><a name="${ constants.CMD4_MODE }"> ${ constants.CMD4_MODE }</a><TD> "${ constants.CMD4_MODE_DEMO }" | "${ constants.CMD4_MODE_ALWAYS }" | "${ constants.CMD4_MODE_POLLED }" | "${ constants.CMD4_MODE_FULLYPOLLED }" <TD> ${ constants.CMD4_MODE_ALWAYS } <TD> Determines what and when characteristics are updated from the device. See <a href="#${ constants.CMD4_MODE }" onclick="toggleVisibility( 'AccessoryDirectives');">${ constants.CMD4_MODE }</a> in Accessory Directives for full description as it can also be set per accessory.</TR>\n` );

// Interval
wfs( `<TR ALIGN="left"><TD><a name="${ constants.INTERVAL }"> ${ constants.INTERVAL }</a><TD> ${ constants.INTERVAL } <TD> ${ constants.DEFAULT_INTERVAL * .001 } < seconds > <TD> How long before killing the state command of all polled characteristics. See <a href="#${ constants.INTERVAL }" onclick="toggleVisibility( 'AccessoryDirectives');">${ constants.INTERVAL }</a> in Accessory Directives for full description as it can also be set per accessory or per characteristic.</TR>\n` );

// Timeout
wfs( `<TR ALIGN="left"><TD><a name="${ constants.TIMEOUT }"> ${ constants.TIMEOUT }</a><TD> ${ constants.TIMEOUT } <TD> ${ constants.DEFAULT_TIMEOUT } < msec > <TD> How long before killing the state command of all polled characteristics. See <a href="#${ constants.TIMEOUT }" onclick="toggleVisibility( 'AccessoryDirectives');">${ constants.TIMEOUT }</a> in Accessory Directives for full description as it can also be set per accessory or per characteristic.</TR>\n` );

// Definitions - Custom Characteristics
wfs( `<TR ALIGN="left"><TD><a name="${ constants.DEFINITIONS }_D"> ${ constants.DEFINITIONS }</a><TD> < Array > <TD> <TD> An Array of new Characteristic Objects. See <a href="#CUSTOM_CHARACTERISTICS" onclick="toggleVisibility( 'CustomCharacteristics');">Custom Characteristics, around line 339</a> for more information</TR>\n` );
Expand Down Expand Up @@ -1132,13 +1139,16 @@ function addCmd4AccessoryDirectivePages_WithinMain( )
// stateChangeResponseTime
wfs( `<TR ALIGN="left"><TD><a name="${ constants.STATECHANGERESPONSETIME }">${ constants.STATECHANGERESPONSETIME }</a><TD> < seconds > <TD> 60 <TD> How long to wait between a Set and Get command.</TR>\n` );

// interval
wfs( `<TR ALIGN="left"><TD><a name="${ constants.INTERVAL }">${ constants.INTERVAL }</a><TD> < seconds > <TD> ${ constants.DEFAULT_INTERVAL * .001 } < seconds > <TD> How long between polls of all polled characteristics.</TR>\n` );

// timeout
wfs( `<TR ALIGN="left"><TD><a name="${ constants.TIMEOUT }">${ constants.TIMEOUT }</a><TD> < msec > <TD> <TD> How long before killing the state command.</TR>\n` );
wfs( `<TR ALIGN="left"><TD><a name="${ constants.TIMEOUT }">${ constants.TIMEOUT }</a><TD> ${ constants.DEFAULT_TIMEOUT } < msec > <TD> ${ constants.DEFAULT_TIMEOUT } <TD> How long before killing the state command of all polled characteristics.</TR>\n` );

// polling
wfs( `<TR ALIGN="left"><TD><a name="${ constants.POLLING }">${ constants.POLLING }</a><TD> < Bool > <TD> false <TD> If the characteristics should be polled for state change.</TR>\n` );

wfs( `<TR><TD><TD COLSPAN=3> or [{"characteristic" < characteristic >, [ "interval": < sec >, "timeout": < msec > ] }] </TR>\n` );
wfs( `<TR><TD><TD COLSPAN=3> or [{"characteristic" < characteristic >, [ "interval": < sec >, "timeout": < msec > ] }] The timeout and interval override any higher directive.</TR>\n` );

// state_cmd
wfs( `<TR ALIGN="left"><TD><a name="${ constants.STATE_CMD }">${ constants.STATE_CMD }</a><TD> < ${ constants.STATE_CMD } > <TD> See Description <TD> The command used to Get/Set Device characteristic State.</TR>\n` );
Expand Down

0 comments on commit 93fec72

Please sign in to comment.