TIM SDK
TIM API C
timedate.h File Reference

Description

Time-Date value.

Object type timedate.

Data Structures

struct  ta_s_timedate
 Time-date. More...
 

Typedefs

typedef struct ta_s_timedate ta_s_timedate_t
 Time-date.
 

Functions

ta_e_result_code_t ta_timedate_get_values (ta_object_t timedate, ta_s_timedate_t *values)
 Get values of time-date in struct. More...
 
ta_e_result_code_t ta_timedate_create (ta_object_t *timedate, const ta_s_timedate_t *values)
 Create time date representing. More...
 

Function Documentation

◆ ta_timedate_create()

ta_e_result_code_t ta_timedate_create ( ta_object_t timedate,
const ta_s_timedate_t values 
)

Create time date representing.

Caller retains a reference to the created timedate. Different users can individually retain the timedate instance themselves by calling ta_object_retain. Each call to ta_object_retain and ta_timedate_create has to be matched with a call to ta_object_release. The timedate instance is destroyed once nobody retains the timedate instance anymore.

Parameters
[out]timedatePointer to variable to write created object instance to. Created object instance is retained.
[in]valuesPointers to struct with time and date values. Memory is not stored by the object instance and can be released after the call returns.
Return values
ta_c_rc_okObject instance has been created and written to timedate.
ta_c_rc_invalid_argumenttimedate is null-pointer.
ta_c_rc_invalid_argumentvalues is null-pointer.
ta_c_rc_out_of_memoryFailed allocating memory.

◆ ta_timedate_get_values()

ta_e_result_code_t ta_timedate_get_values ( ta_object_t  timedate,
ta_s_timedate_t values 
)

Get values of time-date in struct.

Depending on the origin of the time-date not all values are used.

Parameters
[in]timedateObject instance of type timedate.
[out]valuesPointer to variable to write values to.
Return values
ta_c_rc_okObject instance written to values.
ta_c_rc_invalid_argumenttimedate is ta_invalid_object.
ta_c_rc_invalid_argumenttimedate is not of type timedate.
ta_c_rc_invalid_argumentvalues is null-pointer.