예제 #1
0
DDS_ReturnCode_t DDS_DataWriter_write (
				DDS_DataWriter             wp,
				const void                 *data,
				const DDS_InstanceHandle_t handle)
{
	FTime_t	time;

	ctrc_begind (DCPS_ID, DCPS_DW_WRITE, &wp, sizeof (wp));
	ctrc_contd (&data, sizeof (data));
	ctrc_contd (&handle, sizeof (handle));
	ctrc_endd ();

	sys_getftime (&time);
	return (dcps_write (wp, data, 0, handle, &time, NULL));
}
예제 #2
0
DDS_ReturnCode_t DDS_DataWriter_write_w_timestamp (
				DDS_DataWriter             wp,
				const void                 *data,
				const DDS_InstanceHandle_t handle,
				const DDS_Time_t           *time)
{
	FTime_t	ftime;

	ctrc_begind (DCPS_ID, DCPS_DW_WRITE_TS, &wp, sizeof (wp));
	ctrc_contd (&data, sizeof (data));
	ctrc_contd (&handle, sizeof (handle));
	ctrc_contd (time, sizeof (*time));
	ctrc_endd ();

	FTIME_SET (ftime, time->sec, time->nanosec);
	return (dcps_write (wp, data, 0, handle, &ftime, NULL));
}
예제 #3
0
파일: dcps_writer.c 프로젝트: tinq-iot/tinq
DDS_ReturnCode_t DDS_DataWriter_write_w_timestamp_directed (
				DDS_DataWriter             wp,
				const void                 *data,
				const DDS_InstanceHandle_t handle,
				const DDS_Time_t           *time,
				DDS_InstanceHandleSeq      *dests)
{
	FTime_t	ftime;

	ctrc_begind (DCPS_ID, DCPS_DW_WRITE_TS_D, &wp, sizeof (wp));
	ctrc_contd (&data, sizeof (data));
	ctrc_contd (&handle, sizeof (handle));
	ctrc_contd (time, sizeof (*time));
	ctrc_contd (dests, sizeof (dests));
	ctrc_endd ();

	time2ftime ((const Time_t *) time, &ftime);
	return (dcps_write (wp, data, 0, handle, &ftime, dests));
}