Real2Virtual202111
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
| -
|
!
-
|
|
|
|
|
|
!
-
|
|
|
|
|
|
|
-
!
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
!
-
!
| #pragma once
#include "common.h"
#include "CommandBuffer.h"
class CommandBuffer;
class InBuffer{
private:
unsigned char faceID;
unsigned char (*getPort)(void);
void (*setPortMode)(unsigned char s);
unsigned char now;
unsigned char last;
unsigned char p;
unsigned char bits[MaxBits];
unsigned char status;
unsigned char sampleInterval;
unsigned char sampleIntervalCounter;
unsigned char sampleIntForDecode;
unsigned char cin;
int inlen;
char inputBuffer[MaxInterFaceStrLen];
unsigned char nextDoorDirection;
unsigned char correspondingLEDNo;
unsigned char nextDoorFaceID;
unsigned char connected;
CommandBuffer *command;
unsigned char cbp;
public:
InBuffer(unsigned char id, CommandBuffer *com);
void setPortConf( unsigned char (*getfun)(void), void (* modefun)(unsigned char x));
void intrProcess(void);
void setStatus( unsigned char x);
unsigned char getStatus(void);
unsigned char decode(void);
unsigned char getChar(void);
unsigned char getConnected(void);
int getNextDoorDirection(void);
void parse(unsigned char c);
unsigned char startWith(char *c);
void shiftLeft( unsigned char i);
void returnAck(void);
void setCommand(CommandBuffer *x);
void setConnected(unsigned char x);
};
|
Counter: 55,
today: 1,
yesterday: 0