2 * This file is part of the libCEC(R) library.
4 * libCEC(R) is Copyright (C) 2011 Pulse-Eight Limited. All rights reserved.
5 * libCEC(R) is an original work, containing original code.
7 * libCEC(R) is a trademark of Pulse-Eight Limited.
9 * This program is dual-licensed; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
24 * Alternatively, you can license this library under a commercial license,
25 * please contact Pulse-Eight Licensing for more information.
27 * For more information contact:
28 * Pulse-Eight Licensing <license@pulse-eight.com>
29 * http://www.pulse-eight.com/
30 * http://www.pulse-eight.net/
33 #include "CECParser.h"
40 #include "util/StdString.h"
41 #include "libPlatform/serialport.h"
42 #include "util/threads.h"
43 #include "util/timeutils.h"
44 #include "CECDetect.h"
45 #include "Communication.h"
50 #define CEC_MAX_RETRY 5
51 #define CEC_BUTTON_TIMEOUT 500
54 * ICECDevice implementation
57 CCECParser::CCECParser(const char *strDeviceName
, cec_logical_address iLogicalAddress
/* = CECDEVICE_PLAYBACKDEVICE1 */, int iPhysicalAddress
/* = CEC_DEFAULT_PHYSICAL_ADDRESS*/) :
58 m_iCurrentButton(CEC_USER_CONTROL_CODE_UNKNOWN
),
59 m_physicaladdress(iPhysicalAddress
),
60 m_iLogicalAddress(iLogicalAddress
),
61 m_strDeviceName(strDeviceName
),
64 m_communication
= new CCommunication(this);
67 CCECParser::~CCECParser(void)
70 m_communication
->Close();
71 delete m_communication
;
74 bool CCECParser::Open(const char *strPort
, int iTimeoutMs
/* = 10000 */)
79 if (m_communication
->IsOpen())
81 AddLog(CEC_LOG_ERROR
, "connection already open");
85 if (!m_communication
->Open(strPort
, 38400, iTimeoutMs
))
87 AddLog(CEC_LOG_ERROR
, "could not open a connection");
91 if (!SetLogicalAddress(m_iLogicalAddress
))
93 AddLog(CEC_LOG_ERROR
, "could not set the logical address");
97 if (pthread_create(&m_thread
, NULL
, (void *(*) (void *))&CCECParser::ThreadHandler
, (void *)this) == 0)
100 AddLog(CEC_LOG_DEBUG
, "processor thread created");
101 pthread_detach(m_thread
);
106 AddLog(CEC_LOG_ERROR
, "could not create a processor thread");
113 void CCECParser::Close(void)
116 pthread_join(m_thread
, NULL
);
119 void *CCECParser::ThreadHandler(CCECParser
*parser
)
126 bool CCECParser::Process(void)
128 int64_t now
= GetTimeMs();
132 while (m_bRunning
&& m_communication
->IsOpen() && m_communication
->Read(msg
, CEC_BUTTON_TIMEOUT
))
136 CheckKeypressTimeout(now
);
137 CCondition::Sleep(50);
140 AddLog(CEC_LOG_DEBUG
, "processor thread terminated");
142 m_exitCondition
.Signal();
146 bool CCECParser::Ping(void)
151 AddLog(CEC_LOG_DEBUG
, "sending ping");
153 output
.push_back(MSGSTART
);
154 PushEscaped(output
, MSGCODE_PING
);
155 output
.push_back(MSGEND
);
157 if (!TransmitFormatted(output
, false))
159 AddLog(CEC_LOG_ERROR
, "could not send ping command");
163 AddLog(CEC_LOG_DEBUG
, "ping tranmitted");
165 // TODO check for pong
169 bool CCECParser::StartBootloader(void)
174 AddLog(CEC_LOG_DEBUG
, "starting the bootloader");
176 output
.push_back(MSGSTART
);
177 PushEscaped(output
, MSGCODE_START_BOOTLOADER
);
178 output
.push_back(MSGEND
);
180 if (!TransmitFormatted(output
, false))
182 AddLog(CEC_LOG_ERROR
, "could not start the bootloader");
186 AddLog(CEC_LOG_DEBUG
, "bootloader start command transmitted");
190 uint8_t CCECParser::GetSourceDestination(cec_logical_address destination
/* = CECDEVICE_BROADCAST */)
192 return ((uint8_t)m_iLogicalAddress
<< 4) + (uint8_t)destination
;
195 bool CCECParser::PowerOffDevices(cec_logical_address address
/* = CECDEVICE_BROADCAST */)
197 return StandbyDevices(address
);
200 bool CCECParser::PowerOnDevices(cec_logical_address address
/* = CECDEVICE_TV */)
206 strLog
.Format("powering on devices with logical address %d", (int8_t)address
);
207 AddLog(CEC_LOG_DEBUG
, strLog
.c_str());
209 frame
.push_back(GetSourceDestination(address
));
210 frame
.push_back(CEC_OPCODE_TEXT_VIEW_ON
);
211 return Transmit(frame
);
214 bool CCECParser::StandbyDevices(cec_logical_address address
/* = CECDEVICE_BROADCAST */)
220 strLog
.Format("putting all devices with logical address %d in standby mode", (int8_t)address
);
221 AddLog(CEC_LOG_DEBUG
, strLog
.c_str());
223 frame
.push_back(GetSourceDestination(address
));
224 frame
.push_back(CEC_OPCODE_STANDBY
);
225 return Transmit(frame
);
228 bool CCECParser::SetActiveView(void)
233 AddLog(CEC_LOG_DEBUG
, "setting active view");
235 frame
.push_back(GetSourceDestination(CECDEVICE_BROADCAST
));
236 frame
.push_back(CEC_OPCODE_ACTIVE_SOURCE
);
237 frame
.push_back((m_physicaladdress
>> 8) & 0xFF);
238 frame
.push_back(m_physicaladdress
& 0xFF);
239 return Transmit(frame
);
242 bool CCECParser::SetInactiveView(void)
247 AddLog(CEC_LOG_DEBUG
, "setting inactive view");
249 frame
.push_back(GetSourceDestination(CECDEVICE_BROADCAST
));
250 frame
.push_back(CEC_OPCODE_INACTIVE_SOURCE
);
251 frame
.push_back((m_physicaladdress
>> 8) & 0xFF);
252 frame
.push_back(m_physicaladdress
& 0xFF);
253 return Transmit(frame
);
256 bool CCECParser::GetNextLogMessage(cec_log_message
*message
)
258 return m_logBuffer
.Pop(*message
);
261 bool CCECParser::GetNextKeypress(cec_keypress
*key
)
263 return m_bRunning
? m_keyBuffer
.Pop(*key
) : false;
266 bool CCECParser::GetNextCommand(cec_command
*command
)
268 return m_bRunning
? m_commandBuffer
.Pop(*command
) : false;
272 void CCECParser::TransmitAbort(cec_logical_address address
, cec_opcode opcode
, ECecAbortReason reason
/* = CEC_ABORT_REASON_UNRECOGNIZED_OPCODE */)
274 AddLog(CEC_LOG_DEBUG
, "transmitting abort message");
276 frame
.push_back(GetSourceDestination(address
));
277 frame
.push_back(CEC_OPCODE_FEATURE_ABORT
);
278 frame
.push_back(opcode
);
279 frame
.push_back(reason
);
283 void CCECParser::ReportCECVersion(cec_logical_address address
/* = CECDEVICE_TV */)
286 AddLog(CEC_LOG_NOTICE
, "reporting CEC version as 1.3a");
287 frame
.push_back(GetSourceDestination(address
));
288 frame
.push_back(CEC_OPCODE_CEC_VERSION
);
289 frame
.push_back(CEC_VERSION_1_3A
);
293 void CCECParser::ReportPowerState(cec_logical_address address
/*= CECDEVICE_TV */, bool bOn
/* = true */)
297 AddLog(CEC_LOG_NOTICE
, "reporting \"On\" power status");
299 AddLog(CEC_LOG_NOTICE
, "reporting \"Off\" power status");
301 frame
.push_back(GetSourceDestination(address
));
302 frame
.push_back(CEC_OPCODE_REPORT_POWER_STATUS
);
303 frame
.push_back(bOn
? CEC_POWER_STATUS_ON
: CEC_POWER_STATUS_STANDBY
);
307 void CCECParser::ReportMenuState(cec_logical_address address
/* = CECDEVICE_TV */, bool bActive
/* = true */)
311 AddLog(CEC_LOG_NOTICE
, "reporting menu state as active");
313 AddLog(CEC_LOG_NOTICE
, "reporting menu state as inactive");
315 frame
.push_back(GetSourceDestination(address
));
316 frame
.push_back(CEC_OPCODE_MENU_STATUS
);
317 frame
.push_back(bActive
? CEC_MENU_STATE_ACTIVATED
: CEC_MENU_STATE_DEACTIVATED
);
321 void CCECParser::ReportVendorID(cec_logical_address address
/* = CECDEVICE_TV */)
323 AddLog(CEC_LOG_NOTICE
, "vendor ID requested, feature abort");
324 TransmitAbort(address
, CEC_OPCODE_GIVE_DEVICE_VENDOR_ID
);
327 void CCECParser::ReportOSDName(cec_logical_address address
/* = CECDEVICE_TV */)
330 const char *osdname
= m_strDeviceName
.c_str();
332 strLog
.Format("reporting OSD name as %s", osdname
);
333 AddLog(CEC_LOG_NOTICE
, strLog
.c_str());
334 frame
.push_back(GetSourceDestination(address
));
335 frame
.push_back(CEC_OPCODE_SET_OSD_NAME
);
337 for (unsigned int i
= 0; i
< strlen(osdname
); i
++)
338 frame
.push_back(osdname
[i
]);
343 void CCECParser::ReportPhysicalAddress(void)
347 strLog
.Format("reporting physical address as %04x", m_physicaladdress
);
348 AddLog(CEC_LOG_NOTICE
, strLog
.c_str());
349 frame
.push_back(GetSourceDestination(CECDEVICE_BROADCAST
));
350 frame
.push_back(CEC_OPCODE_REPORT_PHYSICAL_ADDRESS
);
351 frame
.push_back((m_physicaladdress
>> 8) & 0xFF);
352 frame
.push_back(m_physicaladdress
& 0xFF);
353 frame
.push_back(CEC_DEVICE_TYPE_PLAYBACK_DEVICE
);
357 void CCECParser::BroadcastActiveSource(void)
360 AddLog(CEC_LOG_NOTICE
, "broadcasting active source");
361 frame
.push_back(GetSourceDestination(CECDEVICE_BROADCAST
));
362 frame
.push_back(CEC_OPCODE_ACTIVE_SOURCE
);
363 frame
.push_back((m_physicaladdress
>> 8) & 0xFF);
364 frame
.push_back(m_physicaladdress
& 0xFF);
368 bool CCECParser::TransmitFormatted(const cec_frame
&data
, bool bWaitForAck
/* = true */)
370 if (!m_communication
|| !m_communication
->Write(data
))
373 CCondition::Sleep((int) data
.size() * 24 /*data*/ + 5 /*start bit (4.5 ms)*/ + 50 /* to be on the safe side */);
374 if (bWaitForAck
&& !WaitForAck())
376 AddLog(CEC_LOG_DEBUG
, "did not receive ACK");
383 bool CCECParser::Transmit(const cec_frame
&data
, bool bWaitForAck
/* = true */)
385 CStdString txStr
= "transmit ";
386 for (unsigned int i
= 0; i
< data
.size(); i
++)
387 txStr
.AppendFormat(" %02x", data
[i
]);
388 AddLog(CEC_LOG_DEBUG
, txStr
.c_str());
392 AddLog(CEC_LOG_WARNING
, "transmit buffer is empty");
398 //set ack polarity to high when transmitting to the broadcast address
399 //set ack polarity low when transmitting to any other address
400 output
.push_back(MSGSTART
);
401 PushEscaped(output
, MSGCODE_TRANSMIT_ACK_POLARITY
);
403 if ((data
[0] & 0xF) == 0xF)
404 PushEscaped(output
, CEC_TRUE
);
406 PushEscaped(output
, CEC_FALSE
);
408 output
.push_back(MSGEND
);
410 for (unsigned int i
= 0; i
< data
.size(); i
++)
412 output
.push_back(MSGSTART
);
414 if (i
== data
.size() - 1)
415 PushEscaped(output
, MSGCODE_TRANSMIT_EOM
);
417 PushEscaped(output
, MSGCODE_TRANSMIT
);
419 PushEscaped(output
, data
[i
]);
421 output
.push_back(MSGEND
);
424 return TransmitFormatted(output
, bWaitForAck
);
427 bool CCECParser::WaitForAck(int iTimeout
/* = 1000 */)
432 int64_t iNow
= GetTimeMs();
433 int64_t iTargetTime
= iNow
+ (int64_t) iTimeout
;
435 while (!bGotAck
&& !bError
&& (iTimeout
<= 0 || iNow
< iTargetTime
))
438 while (!bGotAck
&& !bError
&& m_communication
->Read(msg
, iTimeout
))
440 uint8_t iCode
= msg
[0] & ~(MSGCODE_FRAME_EOM
| MSGCODE_FRAME_ACK
);
444 case MSGCODE_COMMAND_ACCEPTED
:
445 AddLog(CEC_LOG_DEBUG
, "MSGCODE_COMMAND_ACCEPTED");
447 case MSGCODE_TRANSMIT_SUCCEEDED
:
448 AddLog(CEC_LOG_DEBUG
, "MSGCODE_TRANSMIT_SUCCEEDED");
452 case MSGCODE_RECEIVE_FAILED
:
453 AddLog(CEC_LOG_WARNING
, "MSGCODE_RECEIVE_FAILED");
456 case MSGCODE_COMMAND_REJECTED
:
457 AddLog(CEC_LOG_WARNING
, "MSGCODE_COMMAND_REJECTED");
460 case MSGCODE_TRANSMIT_FAILED_LINE
:
461 AddLog(CEC_LOG_WARNING
, "MSGCODE_TRANSMIT_FAILED_LINE");
464 case MSGCODE_TRANSMIT_FAILED_ACK
:
465 AddLog(CEC_LOG_WARNING
, "MSGCODE_TRANSMIT_FAILED_ACK");
468 case MSGCODE_TRANSMIT_FAILED_TIMEOUT_DATA
:
469 AddLog(CEC_LOG_WARNING
, "MSGCODE_TRANSMIT_FAILED_TIMEOUT_DATA");
472 case MSGCODE_TRANSMIT_FAILED_TIMEOUT_LINE
:
473 AddLog(CEC_LOG_WARNING
, "MSGCODE_TRANSMIT_FAILED_TIMEOUT_LINE");
477 m_frameBuffer
.Push(msg
);
478 bGotAck
= (msg
[0] & MSGCODE_FRAME_ACK
) != 0;
485 return bGotAck
&& !bError
;
488 void CCECParser::ParseMessage(cec_frame
&msg
)
494 uint8_t iCode
= msg
[0] & ~(MSGCODE_FRAME_EOM
| MSGCODE_FRAME_ACK
);
495 bool bEom
= (msg
[0] & MSGCODE_FRAME_EOM
) != 0;
496 bool bAck
= (msg
[0] & MSGCODE_FRAME_ACK
) != 0;
500 case MSGCODE_NOTHING
:
501 AddLog(CEC_LOG_DEBUG
, "MSGCODE_NOTHING");
503 case MSGCODE_TIMEOUT_ERROR
:
504 case MSGCODE_HIGH_ERROR
:
505 case MSGCODE_LOW_ERROR
:
507 if (iCode
== MSGCODE_TIMEOUT_ERROR
)
508 logStr
= "MSGCODE_TIMEOUT";
509 else if (iCode
== MSGCODE_HIGH_ERROR
)
510 logStr
= "MSGCODE_HIGH_ERROR";
512 logStr
= "MSGCODE_LOW_ERROR";
514 int iLine
= (msg
.size() >= 3) ? (msg
[1] << 8) | (msg
[2]) : 0;
515 uint32_t iTime
= (msg
.size() >= 7) ? (msg
[3] << 24) | (msg
[4] << 16) | (msg
[5] << 8) | (msg
[6]) : 0;
516 logStr
.AppendFormat(" line:%i", iLine
);
517 logStr
.AppendFormat(" time:%u", iTime
);
518 AddLog(CEC_LOG_WARNING
, logStr
.c_str());
521 case MSGCODE_FRAME_START
:
523 logStr
= "MSGCODE_FRAME_START";
524 m_currentframe
.clear();
527 int iInitiator
= msg
[1] >> 4;
528 int iDestination
= msg
[1] & 0xF;
529 logStr
.AppendFormat(" initiator:%u destination:%u ack:%s %s", iInitiator
, iDestination
, bAck
? "high" : "low", bEom
? "eom" : "");
531 m_currentframe
.push_back(msg
[1]);
533 AddLog(CEC_LOG_DEBUG
, logStr
.c_str());
536 case MSGCODE_FRAME_DATA
:
538 logStr
= "MSGCODE_FRAME_DATA";
541 uint8_t iData
= msg
[1];
542 logStr
.AppendFormat(" %02x", iData
);
543 m_currentframe
.push_back(iData
);
545 AddLog(CEC_LOG_DEBUG
, logStr
.c_str());
555 void CCECParser::ParseCurrentFrame(void)
557 uint8_t initiator
= m_currentframe
[0] >> 4;
558 uint8_t destination
= m_currentframe
[0] & 0xF;
561 dataStr
.Format("received frame: initiator: %u destination: %u", initiator
, destination
);
563 if (m_currentframe
.size() > 1)
566 for (unsigned int i
= 1; i
< m_currentframe
.size(); i
++)
567 dataStr
.AppendFormat(" %02x", m_currentframe
[i
]);
569 AddLog(CEC_LOG_DEBUG
, dataStr
.c_str());
571 if (m_currentframe
.size() <= 1)
575 cec_opcode opCode
= (cec_opcode
) m_currentframe
[1];
576 if (destination
== (uint16_t) m_iLogicalAddress
)
580 case CEC_OPCODE_GIVE_PHYSICAL_ADDRESS
:
581 ReportPhysicalAddress();
584 case CEC_OPCODE_GIVE_OSD_NAME
:
585 ReportOSDName((cec_logical_address
)initiator
);
587 case CEC_OPCODE_GIVE_DEVICE_VENDOR_ID
:
588 ReportVendorID((cec_logical_address
)initiator
);
590 case CEC_OPCODE_MENU_REQUEST
:
591 ReportMenuState((cec_logical_address
)initiator
);
593 case CEC_OPCODE_GIVE_DEVICE_POWER_STATUS
:
594 ReportPowerState((cec_logical_address
)initiator
);
596 case CEC_OPCODE_GET_CEC_VERSION
:
597 ReportCECVersion((cec_logical_address
)initiator
);
599 case CEC_OPCODE_USER_CONTROL_PRESSED
:
600 if (m_currentframe
.size() > 2)
604 if (m_currentframe
[2] <= CEC_USER_CONTROL_CODE_MAX
)
606 m_iCurrentButton
= (cec_user_control_code
) m_currentframe
[2];
607 m_buttontime
= GetTimeMs();
611 case CEC_OPCODE_USER_CONTROL_RELEASE
:
615 cec_frame params
= m_currentframe
;
616 params
.erase(params
.begin(), params
.begin() + 2);
617 AddCommand((cec_logical_address
) initiator
, (cec_logical_address
) destination
, opCode
, ¶ms
);
621 else if (destination
== (uint8_t) CECDEVICE_BROADCAST
)
623 if (opCode
== CEC_OPCODE_REQUEST_ACTIVE_SOURCE
)
625 BroadcastActiveSource();
627 else if (opCode
== CEC_OPCODE_SET_STREAM_PATH
)
629 if (m_currentframe
.size() >= 4)
631 int streamaddr
= ((int)m_currentframe
[2] << 8) | ((int)m_currentframe
[3]);
633 strLog
.Format("%i requests stream path from physical address %04x", initiator
, streamaddr
);
634 AddLog(CEC_LOG_DEBUG
, strLog
.c_str());
635 if (streamaddr
== m_physicaladdress
)
636 BroadcastActiveSource();
641 cec_frame params
= m_currentframe
;
642 params
.erase(params
.begin(), params
.begin() + 2);
643 AddCommand((cec_logical_address
) initiator
, (cec_logical_address
) destination
, opCode
, ¶ms
);
649 strLog
.Format("ignoring frame: destination: %u != %u", destination
, (uint16_t)m_iLogicalAddress
);
650 AddLog(CEC_LOG_DEBUG
, strLog
.c_str());
654 void CCECParser::PushEscaped(cec_frame
&vec
, uint8_t byte
)
656 if (byte
>= MSGESC
&& byte
!= MSGSTART
)
658 vec
.push_back(MSGESC
);
659 vec
.push_back(byte
- ESCOFFSET
);
667 void CCECParser::CheckKeypressTimeout(int64_t now
)
669 if (m_iCurrentButton
!= CEC_USER_CONTROL_CODE_UNKNOWN
&& now
- m_buttontime
> CEC_BUTTON_TIMEOUT
)
672 m_iCurrentButton
= CEC_USER_CONTROL_CODE_UNKNOWN
;
676 bool CCECParser::SetLogicalAddress(cec_logical_address iLogicalAddress
)
679 strLog
.Format("setting logical address to %d", iLogicalAddress
);
680 AddLog(CEC_LOG_NOTICE
, strLog
.c_str());
682 m_iLogicalAddress
= iLogicalAddress
;
683 return SetAckMask(0x1 << (uint8_t)m_iLogicalAddress
);
686 bool CCECParser::SetAckMask(uint16_t iMask
)
689 strLog
.Format("setting ackmask to %2x", iMask
);
690 AddLog(CEC_LOG_DEBUG
, strLog
.c_str());
694 output
.push_back(MSGSTART
);
695 PushEscaped(output
, MSGCODE_SET_ACK_MASK
);
696 PushEscaped(output
, iMask
>> 8);
697 PushEscaped(output
, (uint8_t)iMask
);
698 output
.push_back(MSGEND
);
700 if (!m_communication
->Write(output
))
702 AddLog(CEC_LOG_ERROR
, "could not set the ackmask");
709 void CCECParser::AddLog(cec_log_level level
, const string
&strMessage
)
711 cec_log_message message
;
712 message
.level
= level
;
713 message
.message
.assign(strMessage
.c_str());
714 m_logBuffer
.Push(message
);
717 void CCECParser::AddKey(void)
719 if (m_iCurrentButton
!= CEC_USER_CONTROL_CODE_UNKNOWN
)
722 key
.duration
= (unsigned int) (GetTimeMs() - m_buttontime
);
723 key
.keycode
= m_iCurrentButton
;
724 m_keyBuffer
.Push(key
);
725 m_iCurrentButton
= CEC_USER_CONTROL_CODE_UNKNOWN
;
730 void CCECParser::AddCommand(cec_logical_address source
, cec_logical_address destination
, cec_opcode opcode
, cec_frame
*parameters
)
733 command
.source
= source
;
734 command
.destination
= destination
;
735 command
.opcode
= opcode
;
737 command
.parameters
= *parameters
;
738 if (m_commandBuffer
.Push(command
))
741 strDebug
.Format("stored command '%d' in the command buffer. buffer size = %d", opcode
, m_commandBuffer
.Size());
742 AddLog(CEC_LOG_DEBUG
, strDebug
);
746 AddLog(CEC_LOG_WARNING
, "command buffer is full");
750 int CCECParser::GetMinVersion(void)
752 return CEC_MIN_VERSION
;
755 int CCECParser::GetLibVersion(void)
757 return CEC_LIB_VERSION
;
760 int CCECParser::FindDevices(std::vector
<cec_device
> &deviceList
, const char *strDevicePath
/* = NULL */)
764 strDebug
.Format("trying to autodetect the com port for device path '%s'", strDevicePath
);
766 strDebug
.Format("trying to autodetect all CEC adapters");
767 AddLog(CEC_LOG_DEBUG
, strDebug
);
769 return CCECDetect::FindDevices(deviceList
, strDevicePath
);
772 DECLSPEC
void * CECCreate(const char *strDeviceName
, CEC::cec_logical_address iLogicalAddress
/*= CEC::CECDEVICE_PLAYBACKDEVICE1 */, int iPhysicalAddress
/* = CEC_DEFAULT_PHYSICAL_ADDRESS */)
774 return static_cast< void* > (new CCECParser(strDeviceName
, iLogicalAddress
, iPhysicalAddress
));