Clock

class brainstem.stem.Clock(module, index)[source]

The ClockClass is the interface to the realtime clock.

For modules that support realtime clocks, this class supports getting and setting clock values for year, month, day, hour, minute and second.

getDay()[source]

Get the current day of the month

Returns:
Result object, containing NO_ERROR and current day or
a non zero Error code.
Return type:Result
getHour()[source]

Get the current hour

Returns:
Result object, containing NO_ERROR and current hour or
a non zero Error code.
Return type:Result
getMinute()[source]

Get the current minute

Returns:
Result object, containing NO_ERROR and current minute or
a non zero Error code.
Return type:Result
getMonth()[source]

Get the current month

Returns:
Result object, containing NO_ERROR and current month or
a non zero Error code.
Return type:Result
getSecond()[source]

Get the current second

Returns:
Result object, containing NO_ERROR and current second or
a non zero Error code.
Return type:Result
getYear()[source]

Get the current year

Returns:
Result object, containing NO_ERROR and current year or
a non zero Error code.
Return type:Result
setDay(day)[source]

Set the current day of the month

Param:
value (int): Current 2 digit day.
Returns:Return NO_ERROR on success, or one of the common sets of return error codes on failure.
Return type:Result.error
setHour(hour)[source]

Set the current hour

Param:
value (int): Current 2 digit hour.
Returns:Return NO_ERROR on success, or one of the common sets of return error codes on failure.
Return type:Result.error
setMinute(minute)[source]

Set the current minute

Param:
value (int): Current 2 digit minute.
Returns:Return NO_ERROR on success, or one of the common sets of return error codes on failure.
Return type:Result.error
setMonth(month)[source]

Set the current month

Param:
value (int): Current 2 digit month.
Returns:Return NO_ERROR on success, or one of the common sets of return error codes on failure.
Return type:Result.error
setSecond(second)[source]

Set the current second

Param:
value (int): Current 2 digit second.
Returns:Return NO_ERROR on success, or one of the common sets of return error codes on failure.
Return type:Result.error
setYear(year)[source]

Set the current year

Param:
value (int): Current 4 digit year.
Returns:Return NO_ERROR on success, or one of the common sets of return error codes on failure.
Return type:Result.error