Complex Property State Getter Methods
Description
These methods are used to retrieve the Complex-Property-State of a previously added Property-Element. If the property with the ID does not exist or the property type differs from the requested state type, an empty object will be returned.
Usage
The state could be retrieved to perform an action based on the state data.
// get the state of a time frame selector property
auto timeFrameState =
LaRoomyApi .getTimeFrameSelectorState(MY_TIME_FRAME_SELECTOR_ID );
// perform an action with it
if(timeFrameState .checkIfTimeIsInFrame(currentTime ))
{
// time is in frame - execute something
}
Another case is when a state must be updated. In this scenario the state could be redefined and updated. But in most cases the state change is partially and the rest should remain untouched. So the state must be retrieved, changed and then updated. This is also more convenient as creating a new state from scratch.
// get the state of an rgb selector property
auto rgbState =
LaRoomyApi .getRGBSelectorState(MY_RGB_SELECTOR_ID );
// change only the isOn paramter (all other stay the same)
rgbState .isOn = false;
// update the internal state
LaRoomyApi .updateRGBState(MY_RGB_SELECTOR_ID , rgbState );
API Reference
This a list of all available Complex-State getter methods:
- getRGBSelectorState
- getExtendedLevelSelectorState
- getTimeSelectorState
- getTimeFrameSelectorState
- getDateSelectorState
- getUnlockControlState
- getNavigatorState
- getBarGraphState
- getLineGraphState
- getStringInterrogatorState
- getTextListPresenterState
getRGBSelectorState
RGBSelectorState getRGBSelectorState(cID rgbSelectorID );
Returns the state of the RGBSelector-Property with the given ID. If the ID belongs to a property with invalid type or the ID does not exist, the returned object is empty.
Arguments:
rgbSelectorID - The ID of the Property whose state to be returned.
Return Value:
RGBSelectorState - The state of the element.
getExtendedLevelSelectorState
ExtendedLevelSelectorState getExtendedLevelSelectorState(cID exLevelSelectID );
Returns the state of the ExtendedLevelSelector-Property with the given ID. If the ID belongs to a property with invalid type or the ID does not exist, the returned object is empty.
Arguments:
exLevelSelectID - The ID of the Property whose state to be returned.
Return Value:
ExtendedLevelSelectorState - The state of the element.
getTimeSelectorState
TimeSelectorState getTimeSelectorState(cID timeSelectorID );
Returns the state of the TimeSelector-Property with the given ID. If the ID belongs to a property with invalid type or the ID does not exist, the returned object is empty.
Arguments:
timeSelectorID - The ID of the Property whose state to be returned.
Return Value:
TimeSelectorState - The state of the element.
getTimeFrameSelectorState
TimeFrameSelectorState getTimeFrameSelectorState(cID timeFrameSelectorID );
Returns the state of the TimeFrameSelector-Property with the given ID. If the ID belongs to a property with invalid type or the ID does not exist, the returned object is empty.
Arguments:
timeFrameSelectorID - The ID of the Property whose state to be returned.
Return Value:
TimeFrameSelectorState - The state of the element.
getDateSelectorState
DateSelectorState getDateSelectorState(cID dateSelectorID );
Returns the state of the DateSelector-Property with the given ID. If the ID belongs to a property with invalid type or the ID does not exist, the returned object is empty.
Arguments:
dateSelectorID - The ID of the Property whose state to be returned.
Return Value:
DateSelectorState - The state of the element.
getUnlockControlState
UnlockControlState getUnlockControlState(cID unlockControlID );
Returns the state of the UnlockControl-Property with the given ID. If the ID belongs to a property with invalid type or the ID does not exist, the returned object is empty.
Arguments:
unlockControlID - The ID of the Property whose state to be returned.
Return Value:
UnlockControlState - The state of the element.
getBarGraphState
BarGraphState getBarGraphState(cID barGraphID );
Returns the state of the BarGraph-Property with the given ID. If the ID belongs to a property with invalid type or the ID does not exist, the returned object is empty.
Arguments:
barGraphID - The ID of the Property whose state to be returned.
Return Value:
BarGraphState - The state of the element.
getLineGraphState
LineGraphState getLineGraphState(cID lineGraphID );
Returns the state of the LineGraph-Property with the given ID. If the ID belongs to a property with invalid type or the ID does not exist, the returned object is empty.
Arguments:
lineGraphID - The ID of the Property whose state to be returned.
Return Value:
LineGraphState - The state of the element.
getStringInterrogatorState
StringInterrogatorState getStringInterrogatorState(cID stringInterrogatorID );
Returns the state of the StringInterrogator-Property with the given ID. If the ID belongs to a property with invalid type or the ID does not exist, the returned object is empty.
Arguments:
stringInterrogatorID - The ID of the Property whose state to be returned.
Return Value:
StringInterrogatorState - The state of the element.
getTextListPresenterState
TextListPresenterState getTextListPresenterState(cID textListPresenterID );
Returns the state of the TextListPresenter-Property with the given ID. If the ID belongs to a property with invalid type or the ID does not exist, the returned object is empty.
Arguments:
textListPresenterID - The ID of the Property whose state to be returned.
Return Value:
TextListPresenterState - The state of the element.