阅读背景:

如何将信息从8字节数组传递到可变位数据容器?

来源:互联网 

I have an 8 byte message where the differing chunks of the message are mapped to datums of different types (int, bool, etc.), and they vary in bit sizes (an int value is 12 bits in the message, etc.). I want to pass only the bits a datum is concerned with, but I am not sure if there is a better way. My current thoughts is to make a bit array type with a vector back end and have a templated accessor to get the value contained within to the type specified. Although as I am typing this I am starting to think a great big union of all the possible types could be passed to each datum.I have an 8 byte message where the differing ch




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: