I try to save received sample to sqlite database.
Please refer below Csharp code:
public void createDB() string sql = "create table Data (data BLOB)"; dbConnection.Close(); public void insertData(byte[] data) string sql = "insert into Data (data) values (@data)"; dbConnection.Close(); //////////////////////////////////////////////////////////////////////////////////////////////////////// public override void on_data_available(DDS.DataReader reader)
FooTypeSupport.serialize_data_to_cdr_buffer(data, ref length, instance); insertData(data); |
I tried this, but error occurred.
The serialize_data_to_cdr_buffer() does not copy instance to data.
So data still null.
Then I tried this:
private byte[] serializeData(Foo instance) using (MemoryStream ms = new MemoryStream()) |
Naturally a SerializationException error occurred.
Please Help!
Hey,
Have you tried passing a Byte[] instead of a byte[]?
Hello,
I am not sure what are you trying to do, so maybe what I am about to say doesn't apply, but: did you try recording service: https://community.rti.com/static/documentation/connext-dds/5.2.3/doc/manuals/recording_service/RTI_Recording_Service_GettingStarted.pdf
Best,
Gianpiero