Esempio n. 1
0
void DL_TIMER_Start ( DL_TIMER *oTimer )
{
	/* init outputs */
	DL_MEM_memset(oTimer,0,sizeof(DL_TIMER));

	/* record seconds */
	oTimer->sec = DL_TIME_GetUTCSeconds();

	/* record micro-seconds */
	oTimer->msec = getMSec();

	return;
}
Esempio n. 2
0
void DL_ISO8583_COMMON_SetHandler ( DL_ISO8583_FIELD_DEF *iFieldDefArr,
								    DL_UINT8              iFieldDefItems,
								    DL_ISO8583_HANDLER   *oData )
{
	/* init outputs */
	DL_MEM_memset((void*)oData,0,sizeof(DL_ISO8583_HANDLER));

	/* set fields */
	oData->fieldArr   = iFieldDefArr;
	oData->fieldItems = iFieldDefItems;

	return;
}
Esempio n. 3
0
void DL_ISO8583_MSG_Init ( DL_UINT8       *_iStaticBuf,
				           DL_UINT16       _iStaticBufSize,
				           DL_ISO8583_MSG *ioMsg )
{
	/* init structure */
	DL_MEM_memset((void*)ioMsg,0,sizeof(DL_ISO8583_MSG));

	/* set mode to 'static' if required */
	if ( _iStaticBuf )
	{
		ioMsg->sPtrNext = _iStaticBuf;
		ioMsg->sPtrEnd  = (ioMsg->sPtrNext) + _iStaticBufSize;
	}

	return;
}
Esempio n. 4
0
void DL_ISO8583_MSG_Free ( DL_ISO8583_MSG *ioMsg )
{
	if ( NULL == ioMsg->sPtrNext ) /* dynamic mode */
	{
		int i;

		for ( i=0; i<=kDL_ISO8583_MAX_FIELD_IDX ; i++ )
		{
			/* free memory (if allocated) */
			DL_MEM_free(ioMsg->field[i].ptr);
		} /* end-for(i) */
	}

	/* init structure */
	DL_MEM_memset((void*)ioMsg,0,sizeof(DL_ISO8583_MSG));

	return;
}