cec_device_type types[5];
#ifdef __cplusplus
- void clear(void)
+ void Clear(void)
{
for (unsigned int iPtr = 0; iPtr < 5; iPtr++)
types[iPtr] = CEC_DEVICE_TYPE_RESERVED;
}
- void add(const cec_device_type type)
+ void Add(const cec_device_type type)
{
for (unsigned int iPtr = 0; iPtr < 5; iPtr++)
{
}
}
- bool isset(cec_device_type type)
+ bool IsSet(cec_device_type type)
{
bool bReturn(false);
for (unsigned int iPtr = 0; !bReturn && iPtr < 5; iPtr++)
return bReturn;
}
- bool empty()
+ bool IsEmpty()
{
bool bReturn(true);
for (unsigned int iPtr = 0; bReturn && iPtr < 5; iPtr++)
int addresses[16];
#ifdef __cplusplus
- void clear(void)
+ void Clear(void)
{
primary = CECDEVICE_UNKNOWN;
for (unsigned int iPtr = 0; iPtr < 16; iPtr++)
addresses[iPtr] = 0;
}
- bool empty(void) const
+ bool IsEmpty(void) const
{
return primary == CECDEVICE_UNKNOWN;
}
- uint16_t ackmask(void) const
+ uint16_t AckMask(void) const
{
uint16_t mask = 0;
for (unsigned int iPtr = 0; iPtr < 16; iPtr++)
return mask;
}
- void set(cec_logical_address address)
+ void Set(cec_logical_address address)
{
if (primary == CECDEVICE_UNKNOWN)
primary = address;
addresses[(int) address] = 1;
}
- void unset(cec_logical_address address)
+ void Unset(cec_logical_address address)
{
if (primary == address)
primary = CECDEVICE_UNKNOWN;
addresses[(int) address] = 0;
}
- bool isset(cec_logical_address address) const { return addresses[(int) address] == 1; }
- bool operator[](uint8_t pos) const { return pos < 16 ? isset((cec_logical_address) pos) : false; }
+ bool IsSet(cec_logical_address address) const { return addresses[(int) address] == 1; }
+ bool operator[](uint8_t pos) const { return pos < 16 ? IsSet((cec_logical_address) pos) : false; }
#endif
} cec_logical_addresses;
#ifdef __cplusplus
cec_datapacket &operator =(const struct cec_datapacket &packet)
{
- clear();
+ Clear();
for (uint8_t iPtr = 0; iPtr < packet.size; iPtr++)
- push_back(packet[iPtr]);
+ PushBack(packet[iPtr]);
return *this;
}
- bool empty(void) const { return size == 0; }
- bool full(void) const { return size == 100; }
+ bool IsEmpty(void) const { return size == 0; }
+ bool IsFull(void) const { return size == 100; }
uint8_t operator[](uint8_t pos) const { return pos < size ? data[pos] : 0; }
- uint8_t at(uint8_t pos) const { return pos < size ? data[pos] : 0; }
+ uint8_t At(uint8_t pos) const { return pos < size ? data[pos] : 0; }
- void shift(uint8_t iShiftBy)
+ void Shift(uint8_t iShiftBy)
{
if (iShiftBy >= size)
{
- clear();
+ Clear();
}
else
{
}
}
- void push_back(uint8_t add)
+ void PushBack(uint8_t add)
{
if (size < 100)
data[size++] = add;
}
- void clear(void)
+ void Clear(void)
{
memset(data, 0, sizeof(data));
size = 0;
return *this;
}
- static void format(cec_command &command, cec_logical_address initiator, cec_logical_address destination, cec_opcode opcode)
+ static void Format(cec_command &command, cec_logical_address initiator, cec_logical_address destination, cec_opcode opcode)
{
- command.clear();
+ command.Clear();
command.initiator = initiator;
command.destination = destination;
if (opcode != CEC_OPCODE_NONE)
}
}
- void push_back(uint8_t data)
+ void PushBack(uint8_t data)
{
if (initiator == CECDEVICE_UNKNOWN && destination == CECDEVICE_UNKNOWN)
{
opcode = (cec_opcode) data;
}
else
- parameters.push_back(data);
+ parameters.PushBack(data);
}
- void clear(void)
+ void Clear(void)
{
initiator = CECDEVICE_UNKNOWN;
destination = CECDEVICE_UNKNOWN;
opcode_set = 0;
opcode = CEC_OPCODE_FEATURE_ABORT;
transmit_timeout = 1000;
- parameters.clear();
+ parameters.Clear();
};
#endif
} cec_command;