Ejemplo n.º 1
0
func Get_data_set(req_handle int, idx int) (int, GCI_SET, int) {
	var handle C.int = C.int(req_handle)
	var c_idx C.int = C.int(idx)
	var buf C.T_CCI_SET
	var res C.int
	var indicator C.int
	var data GCI_SET

	res = C.cci_get_data(handle, c_idx, C.CCI_A_TYPE_SET, unsafe.Pointer(&buf), &indicator)
	data = GCI_SET(buf)

	return int(res), data, int(indicator)
}
Ejemplo n.º 2
0
func Get_data_double(req_handle int, idx int) (int, float64, int) {
	var handle C.int = C.int(req_handle)
	var c_idx C.int = C.int(idx)
	var buf C.double
	var res C.int
	var indicator C.int
	var data float64

	res = C.cci_get_data(handle, c_idx, C.CCI_A_TYPE_DOUBLE, unsafe.Pointer(&buf), &indicator)
	data = float64(buf)

	return int(res), data, int(indicator)
}
Ejemplo n.º 3
0
func Get_data_int(req_handle int, idx int) (int, int, int) {
	var handle C.int = C.int(req_handle)
	var c_idx C.int = C.int(idx)
	var buf C.int
	var res C.int
	var indicator C.int
	var data int

	res = C.cci_get_data(handle, c_idx, C.CCI_A_TYPE_INT, unsafe.Pointer(&buf), &indicator)
	data = int(buf)

	return int(res), data, int(indicator)
}
Ejemplo n.º 4
0
func Get_data_string(req_handle int, idx int) (int, string, int) {
	var handle C.int = C.int(req_handle)
	var c_idx C.int = C.int(idx)
	var buf *C.char
	var res C.int
	var indicator C.int
	var data string

	res = C.cci_get_data(handle, c_idx, C.CCI_A_TYPE_STR, unsafe.Pointer(&buf), &indicator)
	data = C.GoString(buf)

	return int(res), data, int(indicator)
}
Ejemplo n.º 5
0
func Get_data_bit(req_handle int, idx int) (int, GCI_BIT, int) {
	var handle C.int = C.int(req_handle)
	var c_idx C.int = C.int(idx)
	var buf C.T_CCI_BIT
	var res C.int
	var indicator C.int
	var data GCI_BIT

	res = C.cci_get_data(handle, c_idx, C.CCI_A_TYPE_BIT, unsafe.Pointer(&buf), &indicator)
	data.size = int(buf.size)
	data.buf = C.GoBytes(unsafe.Pointer(buf.buf), buf.size)

	return int(res), data, int(indicator)
}
Ejemplo n.º 6
0
func Get_data_date(req_handle int, idx int) (int, GCI_DATE, int) {
	log.Println("gci_get_data_date_start")
	var handle C.int = C.int(req_handle)
	var c_idx = C.int(idx)
	var buf C.T_CCI_DATE
	var res C.int
	var indicator C.int
	var data GCI_DATE

	res = C.cci_get_data(handle, c_idx, C.CCI_A_TYPE_DATE,
		unsafe.Pointer(&buf), &indicator)
	data.yr = int(buf.yr)
	data.mon = int(buf.mon)
	data.day = int(buf.day)
	data.hh = int(buf.hh)
	data.mm = int(buf.mm)
	data.ss = int(buf.ss)
	data.ms = int(buf.ms)

	log.Println("gci_get_data_date_end")
	return int(res), data, int(indicator)
}