-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(De)serialization of Value fields #9
Comments
This is not (yet) part of the public API. Can you say something about your use case? Is this for file storage, network transport, or something else? Also, what do you use for Have you seen the |
We must replace pvDataCPP lib with this one in a real-time framework that could use EPICS as a transport layer between nodes, processes, or threads. I took a quick look on
void SerializableControlImpl::alignBuffer(const std::size_t alignment) {
m_buffer_->align(alignment);
}
void SerializableControlImpl::cachedSerialize(const std::shared_ptr<const epics::pvData::Field>& field,
epics::pvData::ByteBuffer* const buffer) {
field->serialize(buffer, this);
} Is there some timeline to make (de)serialization part of the public API? |
The first step is API design. This could be as simple as moving some definitions to an installed header and/or adding simple wrappers. This could be quick. I would like to keep the public API as small as reasonably possible. For example, I'd rather not expose the
There is also the question of what user container(s) types are supported. I don't want to force users to copy the serialized byte array unnecessarily.
The relevant set of internal functions are as follows: These first two are for type descriptions (equivalent to I'm also inclined to hide The other two entry points are "full" structure serialization of all fields, and "valid" serialization of some fields based on a bit mask. These correspond to the two overloads of |
We are developing some PVXS services that have as front-end PVXS subscribers. In all cases, our services discover the PV format from the first value but then, for the rest of received values, they only need the packed binary format of their payloads. Because the complexity of our PVs and their sampling rates, CPU usage is a critical requirement. |
I have analysed encode.. methods and I have seen both of them are based on "to_wire". Taking a look at "to_wire" code, I think we need the same code but discarding: "type codes", end of data "0xff", array sizes, element ids, etc. We would need to extract to buffer pure payloads in order. Could be a way, to use the same "to_wire_field" code but removing the lines I have commented previously? A kind of "to_wire_payload" and "to_wire_field_payload"? |
Is there a way to (de)serialize Value fields, or something similar like the example below in pvData?
The text was updated successfully, but these errors were encountered: