Home > other >  Test: stand on the Internet architecture, how do you deal with?
Test: stand on the Internet architecture, how do you deal with?

Time:09-16

Something connected to the system, have A central machine, multiple terminals, terminal type A, B, C, D, E, A total of five types, the future will also add other type (A) the average new monthly in the end, they were carrying A, B, C, D, E, F, G, H, A total of eight kind of sensors, the future will also increase the sensor type new A sensor (half year), the other customer number, distribution of the whole of China, but different customers purchasing terminal number, the least only less than 10, the most in 1000, the number of procurement

Iot chip hardware built-in frame packaging functions, including modulation demodulation, frequency, selected frame head, address, check,

The terminal carrying sensor below

A: 1 * A
B: 1 + 1 * A * B
C: B + 2 * 1 * C + 1 * D
Dean: 2 * D + 1 + 1 * * E F
E: 2 + 2 + 2 * G * F * H

The precision of each sensor below
A - uint32
B - uint16
C - uint16
D - uint32
E - float32
F - float16
G - uint8
H - uint8

Terminal machine centre and the communication protocol design is as follows:
Because statistics A, B, C, D, E, A cumulative sensor for 1, for 2 B and C for 1, for 2 D, E to 1 A, 2 F, G for 2, H 2, so the unified communication protocol frame format,

Each represents a byte [], uint32 use [i3] [i2] [i1] [i0] said, uint16 (ih) and [il], said float32 with [f3] [f2] [f1] (f0), said float16 expressed in [fh] and [fl]

[A i3] [i2] A [A i1] [A i0] [B1 ih] [B1 il] [B2 ih] [B2 il] ih [C] il [C] [D1 i3] [i2] D1/D1 i1/i0 D1/D2 i3/D2 i2/i1 D2/D2 i0 f3 [e] [e f2] [e] f1 f0 [e] [f1 fh] [f1 fl] [f2 fh] [f2 fl] [I] g1/g2 I [h1] I/h2 I

A frame sensor data, a total of 30 bytes, sensor types is not supported, the corresponding data fill 0,


Question:

1, this kind of communication protocol is what defect? Considering the cost of a product can't use the OTA

2, if you to maintain the system, please stand on the boss, the department manager, single-chip computer programmers, Web programmer's position, how to guarantee their interests?

CodePudding user response:

All into a floating point number or int32 processing

CodePudding user response:

reference 1/f, worldy response:
all into a floating point number or int32 processing

Iot chips usually a frame length is limited, all converted to floating point or int32 is not desirable,

CodePudding user response:

refer to the second floor iot of reply:
Quote: refer to 1st floor worldy response:

All into a floating point number or int32 processing

Iot chips usually a frame length is limited, all converted to floating point or int32 is not desirable,


Think too much, even if you support 100 devices, that is, 400 bytes
Of course, you can also use the grouping, different length of sensor is composed of a group, plus control fields, to send, but the data transfer format, the same is a must

CodePudding user response:

reference worldy reply: 3/f
Quote: refer to the second floor iot of reply:

Quote: refer to 1st floor worldy response:

All into a floating point number or int32 processing

Iot chips usually a frame length is limited, all converted to floating point or int32 is not desirable,


Think too much, even if you support 100 devices, that is, 400 bytes
Of course, you can also use the grouping, different length of sensor is composed of a group, plus control fields, to send, but the data transformation is the same format, or must


You didn't find the key point, first of all need to be able to predict what a product manager in the next few years will come up with the sensor of the permutation and combination, the design of the existing communication protocol must be able to predict the future when the idea of a product manager,

CodePudding user response:

DeviceType + (sensorType1 + dataType + dataLen + data) + (sensorType2 + dataType + dataLen + data) +,,, + + dataType (sensorTypeN + dataLen + data)
Device type and sensor type can be on-demand, direct enumeration data type out corresponding length, add data, the new products come out directly to update the client program parsing the response data, the parser can be directly sent to the corresponding module after the subcontract to operation,

CodePudding user response:

reference month 5 floor bird, response:
deviceType + + dataType (sensorType1 + dataLen + data) + (sensorType2 + dataType + dataLen + data) +,,, + + dataType (sensorTypeN + dataLen + data)
Device type and sensor type can be on-demand, direct enumeration data type out corresponding length, add data, the new products come out directly to update the client program parsing the response data, the parser can be directly sent to the corresponding module after the subcontract to operate,

Positive solution
  • Related