Signal decoding method, signal decoding device, and non-transitory computer-readable recording medium storing program
View Patent ↗A signal decoding method which enables communication between various devices is disclosed according to one aspect. The signal decoding method includes: a step SF 1 of determining whether or not a Datapart length that is a bit length of a data part included in a packet of a visible light signal is an eight bit; and a step SF 2 of decoding the data part according to a result of the determination of the Datapart length, and, in step SF 2 , the decoding is performed according to LSB first when it is determined in step SF 1 that the Datapart length is not an eight-bit length, and the decoding is performed according to MSB first when it is determined in step SF 1 that the Datapart length is the eight-bit length.
1. A visible light signal decoding method, comprising:
determining whether or not a Datapart length, which is a bit length of a data part included in a packet of the visible light signal, is an eight bit, wherein the packet includes a sequence number indicating which one of a plurality of data parts configuring joined data the data part corresponds to;
decoding a LSB (least significant bit) of the data part at first (LSB first) when the Datapart length is determined not to be an eight-bit length in the determining;
decoding a MSB (most significant bit) at first (MSB first) when the Datapart length is determined to be the eight-bit length in the determining; and
determining whether or not the sequence number is a last sequence number of sequence numbers of the plurality of data parts,
when (i) the sequence number is determined to be the last sequence number of the sequence numbers, and (ii) the Datapart length is determined to be the eight-bit length in the determining,
determining whether or not the last sequence number is a specific value,
decoding the LSB at first when the last sequence number is determined not to be the specific value, and
decoding the MSB at first when the last sequence number is determined to be the specific value.
2. The visible light signal decoding method according to claim 1 ,
wherein the specific value is one of “0010”, “0100”, and “0101”.
3. The visible light signal decoding method according to claim 1 , further comprising:
determining whether or not a decoding mode is supporting both the LSB first and the MSB first when the last sequence number is the specific value in the determining of the last sequence number,
decoding the MSB at first when the decoding mode is determined to be not supporting both the LSB first and the MSB first, and
decoding one of the MSB first and the LSB first when the decoding mode is determined to be supporting both the LSB first and the MSB first.
4. The visible light signal decoding method according to claim 3 ,
wherein the data part is decoded by both the MSB first and the LSB first when the decoding mode is determined to be supporting both the LSB first and the MSB first in the determining of the decoding mode.
5. The visible light signal decoding method according to claim 4 , further comprising:
decoding a plurality of packets including the plurality of data parts by both the MSB first and the LSB first, and
selecting one of data from first data decoded by the MSB first and second data decoded by the LSB first, the one of data includes all of the plurality of decoded packets and from which an error is not detected.
6. A visible light signal decoding device comprising:
a processor; and
a memory storing thereon a computer program, which when executed by the processor, causes the processor to perform operations including
determining whether or not a Datapart length, which is a bit length of a data part included in a packet of the visible light signal, is an eight bit;
decoding a LSB (least significant bit) of the data part at first (LSB first) when the Datapart length is determined not to be an eight-bit length in the determining;
decoding a MSB (most significant bit) at first (MSB first) when the Datapart length is determined to be the eight-bit length in the determining; and
determining whether or not the sequence number is a last sequence number of sequence numbers of the plurality of data parts,
when (i) the sequence number is determined to be the last sequence number of the sequence numbers, and (ii) the Datapart length is determined to be the eight-bit length in the determining,
determining whether or not the last sequence number is a specific value,
decoding the LSB at first when the last sequence number is determined not to be the specific value, and
decoding the MSB at first when the last sequence number is determined to be the specific value.
7. A non-transitory computer-readable recording medium storing a program, the program causing a computer to execute operations comprising:
determining whether or not a Datapart length, which is a bit length of a data part included in a packet of a visible light signal, is an eight bit;
decoding a LSB (least significant bit) of the data part at first (LSB first) when the Datapart length is determined not to be an eight-bit length in the determining;
decoding a MSB (most significant bit) at first (MSB first) when the Datapart length is determined to be the eight-bit length in the determining; and
determining whether or not the sequence number is a last sequence number of sequence numbers of the plurality of data parts,
when (i) the sequence number is determined to be the last sequence number of the sequence numbers, and (ii) the Datapart length is determined to be the eight-bit length in the determining,
determining whether or not the last sequence number is a specific value,
decoding the LSB at first when the last sequence number is determined not to be the specific value, and
decoding the MSB at first when the last sequence number is determined to be the specific value.