td_ref_dsname

Refer to DS Object Name

[C Language Interface]

ER ercd = td_ref_dsname ( UINT typE_ID id, UB *dsname ) ;

[Parameters]

UINT type object type

ID id object ID

UB *dsname address to return DS object name

[Return Parameters]

ER ercd Error code

dsname DS object name, set at object creation or by td_set_dsname()

[Error Codes]

E_OK Normal completion

E_PAR Invalid object type

E_NOEXS Object does not exist

E_OBJ DS object name is not used

[Description]

Get DS object name (dsname), which is set at object creation. The object is specified by object type (type) and object ID (id). Object types (type) are as follows:


TN	TSK	0x01	 /* task */
TN	SEM	0x02 /* semaphore */
TN	FLG	0x03	/* event flag */
TN	MBX	0x04	/* mail box */
TN	MBF	0x05	/* message buffer */
TN	POR	0x06	/* rendezvous port */
TN	MTX	0x07	/* mutex */
TN	MPL	0x08	/* variable-size memory pool */
TN	MPF	0x09	/* .xed-size memory pool */
TN	CYC	0x0a	/* cyclic handler */
TN	ALM	0x0b	/* alarm handler */

DS object name is valid if TA_DSNAME is set as object attribute. If DS object name is changed by td_set_dsname(), then td_ref_dsname() refers to the new name. DS object name needs to satisfy the following conditions, but character code range is not checked by T-Kernel.

character (UB) range: a – z, A – Z, 0 – 9

name length: 8 byte (NULL is .lled if name length is less than 8 byte)

Comments