Historical

State

States

Declaration

getStates()

Example

val state:Historical.State
assertTrue(state.states[0].value == CommandResolver.resolve("0c0020010600040100010004000501000200010400050100020201a2000b010008000001598938e788"))
// Doors capability - front left and rear right door is open while locks are unlocked, recorded at 10. January 2017 at 16:32:05 GMT

Capability id

Declaration

getCapabilityID()

Discussion

The identifier of the Capability

Example

val state:Historical.State
assertTrue(state.capabilityID.value == 0x0060)
// Home Charger capability identifier

Start date

Declaration

getStartDate()

Discussion

Start date for historical data query

Example

val state:Historical.State
assertTrue(dateIsSame(state.startDate.value, "2019-10-07T13:04:32.000Z"))
// Start date is 7. October 2019 at 13:04:32 GMT

End date

Declaration

getEndDate()

Discussion

End date for historical data query

Example

val state:Historical.State
assertTrue(dateIsSame(state.endDate.value, "2019-09-27T08:42:30.000Z"))
// End date is 27. September 2019 at 08:42:30 GMT

Setters

Request states

Declaration

public RequestStates(Integer capabilityID, @Nullable Calendar startDate, @Nullable Calendar endDate)

Example

val requestStates = Historical.RequestStates(0x0060, getCalendar("2019-10-07T13:04:32.000Z"), getCalendar("2019-09-27T08:42:30.000Z"))    

Get trips

Declaration

public GetTrips(@Nullable Calendar startDate, @Nullable Calendar endDate)

Example

val getTrips = Historical.GetTrips(getCalendar("2019-10-07T13:04:32.000Z"), getCalendar("2019-09-27T08:42:30.000Z"))