42 }
typedef SProtoNxscopeIOBind;
47 }
typedef SProtoNxscopeNames;
51 SProtoNxscopeIOBind bind;
52 SProtoNxscopeNames name;
53 }
typedef SProtoNxscopeIOBind2;
59#ifdef CONFIG_DAWN_PROTO_NXSCOPE_SAMPLE_THREAD
60 , threadSampleMember()
81 int allocObject(SProtoNxscopeIOBind *alloc);
82 int allocNames(
size_t j, SProtoNxscopeNames *names);
83 int configureNxscope();
85 virtual int initPriv() = 0;
86 virtual int deinitPriv() = 0;
87 virtual int startPriv() = 0;
88 virtual int stopPriv() = 0;
91#ifdef CONFIG_DAWN_IO_NOTIFY
92 typedef int (*nxscope_put_cb_t)(
struct nxscope_s *nxs, uint8_t chan,
void *data, uint8_t dim);
95#ifdef CONFIG_DAWN_PROTO_NXSCOPE_SAMPLE_THREAD
96 struct proto_nxscope_iochan_s;
98 typedef int (*nxscope_sample_cb_t)(
CProtoNxscope *obj,
struct proto_nxscope_iochan_s *iochan);
101 struct proto_nxscope_iochan_s
110#ifdef CONFIG_DAWN_IO_NOTIFY
111 nxscope_put_cb_t put;
114#ifdef CONFIG_DAWN_PROTO_NXSCOPE_SAMPLE_THREAD
115 nxscope_sample_cb_t sample;
118 }
typedef SProtoNxscopeIochan;
122 NXSCOPE_USER_SET_IO = NXSCOPE_HDRID_USER,
123 NXSCOPE_USER_SET_IO_SEEK = NXSCOPE_HDRID_USER + 1
126 CThreadedObject threadRecvMember;
128#ifdef CONFIG_DAWN_PROTO_NXSCOPE_SAMPLE_THREAD
129 CThreadedObject threadSampleMember;
132 struct nxscope_s nxs;
133 struct nxscope_cfg_s nxsCfg;
134 struct nxscope_proto_s nxsProto;
135 struct nxscope_callbacks_s nxsCbs;
137 std::vector<const SProtoNxscopeIOBind *> vchannels;
138 std::vector<const SProtoNxscopeNames *> vnames;
139 std::vector<SProtoNxscopeIochan> vio;
140 bool hasStreamChannels =
false;
144 int handleUserCommand(uint8_t
id, uint8_t *buff);
145 int userSetIO(uint8_t *buff);
146 int userSetIOSeek(uint8_t *buff);
147 int sendAck(
int ret);
149 static int userIdCb(
void *priv, uint8_t
id, uint8_t *buff);
151#ifdef CONFIG_DAWN_IO_NOTIFY
152 static int ioNotifierCb(
void *priv, io_ddata_t *data);
155 uint8_t getChannelDim(
const CIOCommon &io);
156 uint8_t getChannelDtype(
const CIOCommon &io);
157 int nxscopeChannelsCreate();
158 int bindChannelCallbacks(SProtoNxscopeIochan &iochan, uint8_t dtype);
160#ifdef CONFIG_DAWN_IO_NOTIFY
161 static int putInt32(
struct nxscope_s *nxs, uint8_t chan,
void *data, uint8_t dim);
162 static int putUint32(
struct nxscope_s *nxs, uint8_t chan,
void *data, uint8_t dim);
163 static int putUint64(
struct nxscope_s *nxs, uint8_t chan,
void *data, uint8_t dim);
164 static int putFloat(
struct nxscope_s *nxs, uint8_t chan,
void *data, uint8_t dim);
167#ifdef CONFIG_DAWN_PROTO_NXSCOPE_SAMPLE_THREAD
168 void getAndPut(SProtoNxscopeIochan *iochan);
170 static int sampleInt32(CProtoNxscope *obj, SProtoNxscopeIochan *iochan);
171 static int sampleUint32(CProtoNxscope *obj, SProtoNxscopeIochan *iochan);
172 static int sampleUint64(CProtoNxscope *obj, SProtoNxscopeIochan *iochan);
173 static int sampleFloat(CProtoNxscope *obj, SProtoNxscopeIochan *iochan);
178#ifdef CONFIG_DAWN_PROTO_NXSCOPE_SAMPLE_THREAD