MythTV  master
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
FirewireDevice Class Referenceabstract

#include <firewiredevice.h>

Inheritance diagram for FirewireDevice:
Inheritance graph
[legend]
Collaboration diagram for FirewireDevice:
Collaboration graph
[legend]

Public Types

enum  PowerState { kAVCPowerOn, kAVCPowerOff, kAVCPowerUnknown, kAVCPowerQueryFailed }
 
enum  IEEE1394Command {
  kAVCControlCommand = 0x00, kAVCStatusInquiryCommand = 0x01, kAVCSpecificInquiryCommand = 0x02, kAVCNotifyCommand = 0x03,
  kAVCGeneralInquiryCommand = 0x04, kAVCNotImplementedStatus = 0x08, kAVCAcceptedStatus = 0x09, kAVCRejectedStatus = 0x0a,
  kAVCInTransitionStatus = 0x0b, kAVCImplementedStatus = 0x0c, kAVCChangedStatus = 0x0d, kAVCInterimStatus = 0x0f,
  kAVCResponseImplemented = 0x0c
}
 
enum  IEEE1394UnitAddress {
  kAVCSubunitId0 = 0x00, kAVCSubunitId1 = 0x01, kAVCSubunitId2 = 0x02, kAVCSubunitId3 = 0x03,
  kAVCSubunitId4 = 0x04, kAVCSubunitIdExtended = 0x05, kAVCSubunitIdIgnore = 0x07, kAVCSubunitTypeVideoMonitor = (0x00 << 3),
  kAVCSubunitTypeAudio = (0x01 << 3), kAVCSubunitTypePrinter = (0x02 << 3), kAVCSubunitTypeDiscRecorder = (0x03 << 3), kAVCSubunitTypeTapeRecorder = (0x04 << 3),
  kAVCSubunitTypeTuner = (0x05 << 3), kAVCSubunitTypeCA = (0x06 << 3), kAVCSubunitTypeVideoCamera = (0x07 << 3), kAVCSubunitTypePanel = (0x09 << 3),
  kAVCSubunitTypeBulletinBoard = (0x0a << 3), kAVCSubunitTypeCameraStorage = (0x0b << 3), kAVCSubunitTypeMusic = (0x0c << 3), kAVCSubunitTypeVendorUnique = (0x1c << 3),
  kAVCSubunitTypeExtended = (0x1e << 3), kAVCSubunitTypeUnit = (0x1f << 3)
}
 
enum  IEEE1394Opcode {
  kAVCUnitPlugInfoOpcode = 0x02, kAVCUnitDigitalOutputOpcode = 0x10, kAVCUnitDigitalInputOpcode = 0x11, kAVCUnitChannelUsageOpcode = 0x12,
  kAVCUnitOutputPlugSignalFormatOpcode = 0x18, kAVCUnitInputPlugSignalFormatOpcode = 0x19, kAVCUnitConnectAVOpcode = 0x20, kAVCUnitDisconnectAVOpcode = 0x21,
  kAVCUnitConnectionsOpcode = 0x22, kAVCUnitConnectOpcode = 0x24, kAVCUnitDisconnectOpcode = 0x25, kAVCUnitUnitInfoOpcode = 0x30,
  kAVCUnitSubunitInfoOpcode = 0x31, kAVCUnitSignalSourceOpcode = 0x1a, kAVCUnitPowerOpcode = 0xb2, kAVCCommonOpenDescriptorOpcode = 0x08,
  kAVCCommonReadDescriptorOpcode = 0x09, kAVCCommonWriteDescriptorOpcode = 0x0A, kAVCCommonSearchDescriptorOpcode = 0x0B, kAVCCommonObjectNumberSelectOpcode = 0x0D,
  kAVCCommonPowerOpcode = 0xB2, kAVCCommonReserveOpcode = 0x01, kAVCCommonPlugInfoOpcode = 0x02, kAVCCommonVendorDependentOpcode = 0x00,
  kAVCPanelPassThrough = 0x7c
}
 
enum  IEEE1394UnitPowerParam0 { kAVCPowerStateOn = 0x70, kAVCPowerStateOff = 0x60, kAVCPowerStateQuery = 0x7f }
 
enum  IEEE1394PanelPassThroughParam0 {
  kAVCPanelKeySelect = 0x00, kAVCPanelKeyUp = 0x01, kAVCPanelKeyDown = 0x02, kAVCPanelKeyLeft = 0x03,
  kAVCPanelKeyRight = 0x04, kAVCPanelKeyRightUp = 0x05, kAVCPanelKeyRightDown = 0x06, kAVCPanelKeyLeftUp = 0x07,
  kAVCPanelKeyLeftDown = 0x08, kAVCPanelKeyRootMenu = 0x09, kAVCPanelKeySetupMenu = 0x0A, kAVCPanelKeyContentsMenu = 0x0B,
  kAVCPanelKeyFavoriteMenu = 0x0C, kAVCPanelKeyExit = 0x0D, kAVCPanelKey0 = 0x20, kAVCPanelKey1 = 0x21,
  kAVCPanelKey2 = 0x22, kAVCPanelKey3 = 0x23, kAVCPanelKey4 = 0x24, kAVCPanelKey5 = 0x25,
  kAVCPanelKey6 = 0x26, kAVCPanelKey7 = 0x27, kAVCPanelKey8 = 0x28, kAVCPanelKey9 = 0x29,
  kAVCPanelKeyDot = 0x2A, kAVCPanelKeyEnter = 0x2B, kAVCPanelKeyClear = 0x2C, kAVCPanelKeyChannelUp = 0x30,
  kAVCPanelKeyChannelDown = 0x31, kAVCPanelKeyPreviousChannel = 0x32, kAVCPanelKeySoundSelect = 0x33, kAVCPanelKeyInputSelect = 0x34,
  kAVCPanelKeyDisplayInfo = 0x35, kAVCPanelKeyHelp = 0x36, kAVCPanelKeyPageUp = 0x37, kAVCPanelKeyPageDown = 0x38,
  kAVCPanelKeyPower = 0x40, kAVCPanelKeyVolumeUp = 0x41, kAVCPanelKeyVolumeDown = 0x42, kAVCPanelKeyMute = 0x43,
  kAVCPanelKeyPlay = 0x44, kAVCPanelKeyStop = 0x45, kAVCPanelKeyPause = 0x46, kAVCPanelKeyRecord = 0x47,
  kAVCPanelKeyRewind = 0x48, kAVCPanelKeyFastForward = 0x49, kAVCPanelKeyEject = 0x4a, kAVCPanelKeyForward = 0x4b,
  kAVCPanelKeyBackward = 0x4c, kAVCPanelKeyAngle = 0x50, kAVCPanelKeySubPicture = 0x51, kAVCPanelKeyTuneFunction = 0x67,
  kAVCPanelKeyPress = 0x00, kAVCPanelKeyRelease = 0x80
}
 

Public Member Functions

virtual ~FirewireDevice ()=default
 
virtual bool OpenPort (void)=0
 
virtual bool ClosePort (void)=0
 
virtual bool ResetBus (void)
 
virtual void AddListener (TSDataListener *)
 
virtual void RemoveListener (TSDataListener *)
 
virtual bool SetPowerState (bool on)
 
virtual bool SetChannel (const QString &panel_model, uint alt_method, uint channel)
 
virtual bool IsPortOpen (void) const =0
 
bool IsSTBBufferCleared (void) const
 
virtual PowerState GetPowerState (void)
 

Static Public Member Functions

static bool IsSTBSupported (const QString &model)
 
static QString GetModelName (uint vendor_id, uint model_id)
 
static vector< AVCInfoGetSTBList (void)
 

Protected Member Functions

 FirewireDevice (uint64_t guid, uint subunitid, uint speed)
 
virtual bool SendAVCCommand (const vector< uint8_t > &cmd, vector< uint8_t > &result, int retry_cnt)=0
 
bool GetSubunitInfo (uint8_t table[32])
 
void SetLastChannel (uint channel)
 
void ProcessPATPacket (const TSPacket &)
 
virtual void BroadcastToListeners (const unsigned char *data, uint dataSize)
 

Protected Attributes

uint64_t m_guid
 
uint m_subunitid
 
uint m_speed
 
uint m_last_channel {0}
 
uint m_last_crc {0}
 
bool m_buffer_cleared {true}
 
uint m_open_port_cnt {0}
 
vector< TSDataListener * > m_listeners
 
QMutex m_lock
 

Static Protected Attributes

static QMap< uint64_t, QString > s_id_to_model
 Vendor ID + Model ID to FirewireDevice STB model string. More...
 
static QMutex s_static_lock
 

Detailed Description

Definition at line 24 of file firewiredevice.h.

Member Enumeration Documentation

◆ PowerState

Enumerator
kAVCPowerOn 
kAVCPowerOff 
kAVCPowerUnknown 
kAVCPowerQueryFailed 

Definition at line 29 of file firewiredevice.h.

◆ IEEE1394Command

Enumerator
kAVCControlCommand 
kAVCStatusInquiryCommand 
kAVCSpecificInquiryCommand 
kAVCNotifyCommand 
kAVCGeneralInquiryCommand 
kAVCNotImplementedStatus 
kAVCAcceptedStatus 
kAVCRejectedStatus 
kAVCInTransitionStatus 
kAVCImplementedStatus 
kAVCChangedStatus 
kAVCInterimStatus 
kAVCResponseImplemented 

Definition at line 38 of file firewiredevice.h.

◆ IEEE1394UnitAddress

Enumerator
kAVCSubunitId0 
kAVCSubunitId1 
kAVCSubunitId2 
kAVCSubunitId3 
kAVCSubunitId4 
kAVCSubunitIdExtended 
kAVCSubunitIdIgnore 
kAVCSubunitTypeVideoMonitor 
kAVCSubunitTypeAudio 
kAVCSubunitTypePrinter 
kAVCSubunitTypeDiscRecorder 
kAVCSubunitTypeTapeRecorder 
kAVCSubunitTypeTuner 
kAVCSubunitTypeCA 
kAVCSubunitTypeVideoCamera 
kAVCSubunitTypePanel 
kAVCSubunitTypeBulletinBoard 
kAVCSubunitTypeCameraStorage 
kAVCSubunitTypeMusic 
kAVCSubunitTypeVendorUnique 
kAVCSubunitTypeExtended 
kAVCSubunitTypeUnit 

Definition at line 58 of file firewiredevice.h.

◆ IEEE1394Opcode

Enumerator
kAVCUnitPlugInfoOpcode 
kAVCUnitDigitalOutputOpcode 
kAVCUnitDigitalInputOpcode 
kAVCUnitChannelUsageOpcode 
kAVCUnitOutputPlugSignalFormatOpcode 
kAVCUnitInputPlugSignalFormatOpcode 
kAVCUnitConnectAVOpcode 
kAVCUnitDisconnectAVOpcode 
kAVCUnitConnectionsOpcode 
kAVCUnitConnectOpcode 
kAVCUnitDisconnectOpcode 
kAVCUnitUnitInfoOpcode 
kAVCUnitSubunitInfoOpcode 
kAVCUnitSignalSourceOpcode 
kAVCUnitPowerOpcode 
kAVCCommonOpenDescriptorOpcode 
kAVCCommonReadDescriptorOpcode 
kAVCCommonWriteDescriptorOpcode 
kAVCCommonSearchDescriptorOpcode 
kAVCCommonObjectNumberSelectOpcode 
kAVCCommonPowerOpcode 
kAVCCommonReserveOpcode 
kAVCCommonPlugInfoOpcode 
kAVCCommonVendorDependentOpcode 
kAVCPanelPassThrough 

Definition at line 86 of file firewiredevice.h.

◆ IEEE1394UnitPowerParam0

Enumerator
kAVCPowerStateOn 
kAVCPowerStateOff 
kAVCPowerStateQuery 

Definition at line 121 of file firewiredevice.h.

◆ IEEE1394PanelPassThroughParam0

Enumerator
kAVCPanelKeySelect 
kAVCPanelKeyUp 
kAVCPanelKeyDown 
kAVCPanelKeyLeft 
kAVCPanelKeyRight 
kAVCPanelKeyRightUp 
kAVCPanelKeyRightDown 
kAVCPanelKeyLeftUp 
kAVCPanelKeyLeftDown 
kAVCPanelKeyRootMenu 
kAVCPanelKeySetupMenu 
kAVCPanelKeyContentsMenu 
kAVCPanelKeyFavoriteMenu 
kAVCPanelKeyExit 
kAVCPanelKey0 
kAVCPanelKey1 
kAVCPanelKey2 
kAVCPanelKey3 
kAVCPanelKey4 
kAVCPanelKey5 
kAVCPanelKey6 
kAVCPanelKey7 
kAVCPanelKey8 
kAVCPanelKey9 
kAVCPanelKeyDot 
kAVCPanelKeyEnter 
kAVCPanelKeyClear 
kAVCPanelKeyChannelUp 
kAVCPanelKeyChannelDown 
kAVCPanelKeyPreviousChannel 
kAVCPanelKeySoundSelect 
kAVCPanelKeyInputSelect 
kAVCPanelKeyDisplayInfo 
kAVCPanelKeyHelp 
kAVCPanelKeyPageUp 
kAVCPanelKeyPageDown 
kAVCPanelKeyPower 
kAVCPanelKeyVolumeUp 
kAVCPanelKeyVolumeDown 
kAVCPanelKeyMute 
kAVCPanelKeyPlay 
kAVCPanelKeyStop 
kAVCPanelKeyPause 
kAVCPanelKeyRecord 
kAVCPanelKeyRewind 
kAVCPanelKeyFastForward 
kAVCPanelKeyEject 
kAVCPanelKeyForward 
kAVCPanelKeyBackward 
kAVCPanelKeyAngle 
kAVCPanelKeySubPicture 
kAVCPanelKeyTuneFunction 
kAVCPanelKeyPress 
kAVCPanelKeyRelease 

Definition at line 128 of file firewiredevice.h.

Constructor & Destructor Documentation

◆ ~FirewireDevice()

virtual FirewireDevice::~FirewireDevice ( )
virtualdefault

◆ FirewireDevice()

FirewireDevice::FirewireDevice ( uint64_t  guid,
uint  subunitid,
uint  speed 
)
protected

Definition at line 30 of file firewiredevice.cpp.

Member Function Documentation

◆ OpenPort()

virtual bool FirewireDevice::OpenPort ( void  )
pure virtual

◆ ClosePort()

virtual bool FirewireDevice::ClosePort ( void  )
pure virtual

◆ ResetBus()

virtual bool FirewireDevice::ResetBus ( void  )
inlinevirtual

Reimplemented in LinuxFirewireDevice, and DarwinFirewireDevice.

Definition at line 198 of file firewiredevice.h.

◆ AddListener()

void FirewireDevice::AddListener ( TSDataListener listener)
virtual

◆ RemoveListener()

void FirewireDevice::RemoveListener ( TSDataListener listener)
virtual

◆ SetPowerState()

bool FirewireDevice::SetPowerState ( bool  on)
virtual

Definition at line 70 of file firewiredevice.cpp.

Referenced by FirewireChannel::SetPowerState().

◆ SetChannel()

bool FirewireDevice::SetChannel ( const QString &  panel_model,
uint  alt_method,
uint  channel 
)
virtual

◆ IsPortOpen()

virtual bool FirewireDevice::IsPortOpen ( void  ) const
pure virtual

◆ IsSTBBufferCleared()

bool FirewireDevice::IsSTBBufferCleared ( void  ) const
inline

Definition at line 210 of file firewiredevice.h.

Referenced by FirewireSignalMonitor::HandlePAT().

◆ GetPowerState()

FirewireDevice::PowerState FirewireDevice::GetPowerState ( void  )
virtual

Definition at line 104 of file firewiredevice.cpp.

Referenced by FirewireChannel::GetPowerState().

◆ IsSTBSupported()

bool FirewireDevice::IsSTBSupported ( const QString &  model)
static

Definition at line 495 of file firewiredevice.cpp.

Referenced by FirewireChannel::Open(), and SetChannel().

◆ GetModelName()

QString FirewireDevice::GetModelName ( uint  vendor_id,
uint  model_id 
)
static

Definition at line 354 of file firewiredevice.cpp.

Referenced by FirewireModel::SetGUID().

◆ GetSTBList()

vector< AVCInfo > FirewireDevice::GetSTBList ( void  )
static

Definition at line 367 of file firewiredevice.cpp.

Referenced by FirewireGUID::FirewireGUID().

◆ SendAVCCommand()

virtual bool FirewireDevice::SendAVCCommand ( const vector< uint8_t > &  cmd,
vector< uint8_t > &  result,
int  retry_cnt 
)
protectedpure virtual

◆ GetSubunitInfo()

bool FirewireDevice::GetSubunitInfo ( uint8_t  table[32])
protected

◆ SetLastChannel()

void FirewireDevice::SetLastChannel ( uint  channel)
protected

Definition at line 324 of file firewiredevice.cpp.

Referenced by SetChannel().

◆ ProcessPATPacket()

void FirewireDevice::ProcessPATPacket ( const TSPacket tspacket)
protected

Definition at line 333 of file firewiredevice.cpp.

Referenced by BroadcastToListeners().

◆ BroadcastToListeners()

void FirewireDevice::BroadcastToListeners ( const unsigned char *  data,
uint  dataSize 
)
protectedvirtual

Member Data Documentation

◆ m_guid

uint64_t FirewireDevice::m_guid
protected

◆ m_subunitid

uint FirewireDevice::m_subunitid
protected

Definition at line 234 of file firewiredevice.h.

Referenced by SetChannel().

◆ m_speed

uint FirewireDevice::m_speed
protected

◆ m_last_channel

uint FirewireDevice::m_last_channel {0}
protected

Definition at line 236 of file firewiredevice.h.

Referenced by SetLastChannel().

◆ m_last_crc

uint FirewireDevice::m_last_crc {0}
protected

Definition at line 237 of file firewiredevice.h.

Referenced by ProcessPATPacket().

◆ m_buffer_cleared

bool FirewireDevice::m_buffer_cleared {true}
protected

Definition at line 238 of file firewiredevice.h.

Referenced by ProcessPATPacket(), and SetLastChannel().

◆ m_open_port_cnt

uint FirewireDevice::m_open_port_cnt {0}
protected

◆ m_listeners

vector<TSDataListener*> FirewireDevice::m_listeners
protected

◆ m_lock

QMutex FirewireDevice::m_lock
mutableprotected

◆ s_id_to_model

QMap< uint64_t, QString > FirewireDevice::s_id_to_model
staticprotected

Vendor ID + Model ID to FirewireDevice STB model string.

Definition at line 245 of file firewiredevice.h.

Referenced by GetModelName().

◆ s_static_lock

QMutex FirewireDevice::s_static_lock
staticprotected

Definition at line 246 of file firewiredevice.h.

Referenced by GetModelName().


The documentation for this class was generated from the following files: