예제 #1
0
파일: SeqList.cs 프로젝트: hominlinx/cppbed
 public bool Change(Status_List_t msg)
 {
     int index = Find(msg.cmdType, msg.id);
     if (index == -1)
         return false;
     test[index] = msg;
     return true;
 }
예제 #2
0
파일: SeqList.cs 프로젝트: hominlinx/cppbed
        public bool Add(Status_List_t CAN_Massege)
        {
            test[currentPtr] = CAN_Massege;
            currentPtr++;
            currentPtr %= SEQ_NUM;

            return true;
        }
예제 #3
0
파일: SeqList.cs 프로젝트: hominlinx/cppbed
        public Status_List_t Get(byte cmdType, ushort id)
        {
            Status_List_t temp = new Status_List_t();

            for (int i = 0; i < test.Length; i++)
            {
                if ((cmdType == test[i].cmdType) &&(id == test[i].id))
                    return test[i];
            }

            return temp;
        }