Complex Property State Update Methods
Description
With the state update methods the previously added state of a complex property is overwritten. If the remote device is connected to the LaRoomy App, an state-update transmission will be sent.
Usage
The first scenario is when a state should be completely replaced.
// create a new state
ExtendedLevelSelectorState exLevelState ;
exLevelState .isOn = false;
exLevelState .minValu e = -50;
exLevelState .maxValue = 100;
exLevelState .levelValue = 0;
// override the existing state
LaRoomyApi .updateExLevelState(MY_EX_LEVEL_SELECTOR , exLevelState );
In the second scenario the existing state should be kept, but a single parameter must be changed. The procedure here is to get the existing state, change it and insert it again.
// get the existing state (from a LineGraph)
auto lineGraphState =
LaRoomyApi .getLineGraphState(MY_LINEGRAPH_ID );
// disable grid-lines in the line-graph
lineGraphState .drawGridLines = false;
// re-add it
LaRoomyApi .updateLineGraphState(MY_LINEGRAPH_ID , lineGraphState );
API Reference
This is a list of all available complex property state update methods:
- updateRGBState
- updateExLevelState
- updateTimeSelectorState
- updateTimeFrameSelectorState
- updateDateSelectorState
- updateUnlockControlState
- updateNavigatorState
- updateBarGraphState
- updateLineGraphState
- updateStringInterrogatorState
- updateTextListPresenterState
updateRGBState
void updateRGBState(cID rgbSelectorID , RGBSelectorState& state );
Overrides the existing state of a RGB-Selector property. If the remote device is connected to the app, an update transmission will be sent.
Arguments:
rgbSelectorID - The ID of the property whose state to be updated.
state - The new state. Type: RGBSelectorState
updateExLevelState
void updateExLevelState(cID extendedLevelSelectorID , ExtendedLevelSelectorState& state );
Overrides the existing state of a Extended-Level-Selector property. If the remote device is connected to the app, an update transmission will be sent.
Arguments:
extendedLevelSelectorID - The ID of the property whose state to be updated.
state - The new state. Type: ExtendedLevelSelectorState
updateTimeSelectorState
void updateTimeSelectorState(cID timeSelectorID , TimeSelectorState& state );
Overrides the existing state of a Time-Selector property. If the remote device is connected to the app, an update transmission will be sent.
Arguments:
timeSelectorID - The ID of the property whose state to be updated.
state - The new state. Type: TimeSelectorState
updateTimeFrameSelectorState
void updateTimeFrameSelectorState(cID timeFrameSelectorID , TimeFrameSelectorState& state );
Overrides the existing state of a TimeFrame-Selector property. If the remote device is connected to the app, an update transmission will be sent.
Arguments:
timeFrameSelectorID - The ID of the property whose state to be updated.
state - The new state. Type: TimeFrameSelectorState
updateDateSelectorState
void updateDateSelectorState(cID dateSelectorID , DateSelectorState& state );
Overrides the existing state of a Date-Selector property. If the remote device is connected to the app, an update transmission will be sent.
Arguments:
dateSelectorID - The ID of the property whose state to be updated.
state - The new state. Type: DateSelectorState
updateUnlockControlState
void updateUnlockControlState(cID unlockControlID , UnlockControlState& state );
Overrides the existing state of a UnlockControl property. If the remote device is connected to the app, an update transmission will be sent.
Arguments:
unlockControlID - The ID of the property whose state to be updated.
state - The new state. Type: UnlockControlState
updateBarGraphState
void updateBarGraphState(cID barGraphID , BarGraphState& state );
Overrides the existing state of a BarGraph property. If the remote device is connected to the app, an update transmission will be sent.
Arguments:
barGraphID - The ID of the property whose state to be updated.
state - The new state. Type: BarGraphState
updateLineGraphState
void updateLineGraphState(cID lineGraphID , LineGraphState& state );
Overrides the existing state of a LineGraph property. If the remote device is connected to the app, an update transmission will be sent.
Arguments:
lineGraphID - The ID of the property whose state to be updated.
state - The new state. Type: LineGraphState
updateStringInterrogatorState
void updateStringInterrogatorState(cID stringInterrogatorID , StringInterrogatorState& state );
Overrides the existing state of a StringInterrogator property. If the remote device is connected to the app, an update transmission will be sent.
Arguments:
stringInterrogatorID - The ID of the property whose state to be updated.
state - The new state. Type: StringInterrogatorState
updateTextListPresenterState
void updateTextListPresenterState(cID textListPresenterID , TextListPresenterState& state );
Overrides the existing state of a TextListPresenter property. If the remote device is connected to the app, an update transmission will be sent.
Arguments:
textListPresenterID - The ID of the property whose state to be updated.
state - The new state. Type: TextListPresenterState