MythTV  master
Signals | Public Member Functions | Protected Member Functions | Private Attributes | List of all members
Commands Class Reference

#include <mythexternrecorder/MythExternControl.h>

Inheritance diagram for Commands:
[legend]
Collaboration diagram for Commands:
[legend]

Signals

void CloseFile (void)
 
void SendBytes (void)
 

Public Member Functions

 Commands (MythExternControl *parent)
 
 ~Commands (void) override=default
 
void Start (void)
 
void Join (void)
 
bool SendStatus (const QString &command, const QString &status, const QString &serial, const QString &response="")
 
bool ProcessCommand (const QString &query)
 
 Commands (void)
 
 ~Commands (void) override=default
 
bool Run (const QString &filename, int data_rate, bool loopinput)
 
void setEoF (void)
 

Protected Member Functions

void Run (void)
 
bool Open (void)
 
void Close (void)
 
void StartStreaming (const QString &serial)
 
void StopStreaming (const QString &serial, bool silent)
 
void LockTimeout (const QString &serial) const
 
void HasTuner (const QString &serial) const
 
void HasPictureAttributes (const QString &serial) const
 
void SetBlockSize (const QString &serial, int blksz)
 
void TuneChannel (const QString &serial, const QVariantMap &args)
 
void TuneStatus (const QString &serial)
 
void LoadChannels (const QString &serial)
 
void FirstChannel (const QString &serial)
 
void NextChannel (const QString &serial)
 
void Cleanup (void)
 
bool send_status (const QString &status) const
 
bool process_command (QString &cmd)
 

Private Attributes

std::thread m_thread
 
size_t m_repCmdCnt { 0 }
 
QString m_prevStatus
 
QString m_prevMsgBuf
 
MythExternControlm_parent { nullptr }
 
int m_apiVersion { -1 }
 
QString m_fileName
 
Streamerm_streamer { nullptr }
 
int m_timeout { 10 }
 
bool m_run { true }
 
QAtomicInt m_eof { 0 }
 

Detailed Description

Definition at line 74 of file MythExternControl.h.

Constructor & Destructor Documentation

◆ Commands() [1/2]

Commands::Commands ( MythExternControl parent)
inlineexplicit

Definition at line 79 of file MythExternControl.h.

◆ ~Commands() [1/2]

Commands::~Commands ( void  )
overridedefault

◆ Commands() [2/2]

Commands::Commands ( void  )

Definition at line 165 of file mythfilerecorder.cpp.

◆ ~Commands() [2/2]

Commands::~Commands ( void  )
overridedefault

Member Function Documentation

◆ Start()

void Commands::Start ( void  )
inline

Definition at line 82 of file MythExternControl.h.

Referenced by MythExternControl::MythExternControl().

◆ Join()

void Commands::Join ( void  )
inline

Definition at line 85 of file MythExternControl.h.

Referenced by MythExternControl::~MythExternControl().

◆ SendStatus()

bool Commands::SendStatus ( const QString &  command,
const QString &  status,
const QString &  serial,
const QString &  response = "" 
)

Definition at line 205 of file MythExternControl.cpp.

Referenced by ProcessCommand(), and MythExternControl::SendMessage().

◆ ProcessCommand()

bool Commands::ProcessCommand ( const QString &  query)

Definition at line 268 of file MythExternControl.cpp.

Referenced by Run().

◆ Run() [1/2]

void Commands::Run ( void  )
protected

Definition at line 443 of file MythExternControl.cpp.

Referenced by Start().

◆ Open()

bool Commands::Open ( void  )
protected

◆ Close()

void Commands::Close ( void  )
protected

Definition at line 136 of file MythExternControl.cpp.

◆ StartStreaming()

void Commands::StartStreaming ( const QString &  serial)
protected

Definition at line 145 of file MythExternControl.cpp.

Referenced by ProcessCommand().

◆ StopStreaming()

void Commands::StopStreaming ( const QString &  serial,
bool  silent 
)
protected

Definition at line 150 of file MythExternControl.cpp.

Referenced by ProcessCommand().

◆ LockTimeout()

void Commands::LockTimeout ( const QString &  serial) const
protected

Definition at line 155 of file MythExternControl.cpp.

Referenced by ProcessCommand().

◆ HasTuner()

void Commands::HasTuner ( const QString &  serial) const
protected

Definition at line 160 of file MythExternControl.cpp.

Referenced by ProcessCommand().

◆ HasPictureAttributes()

void Commands::HasPictureAttributes ( const QString &  serial) const
protected

Definition at line 165 of file MythExternControl.cpp.

Referenced by ProcessCommand().

◆ SetBlockSize()

void Commands::SetBlockSize ( const QString &  serial,
int  blksz 
)
protected

Definition at line 170 of file MythExternControl.cpp.

Referenced by ProcessCommand().

◆ TuneChannel()

void Commands::TuneChannel ( const QString &  serial,
const QVariantMap &  args 
)
protected

Definition at line 175 of file MythExternControl.cpp.

Referenced by ProcessCommand().

◆ TuneStatus()

void Commands::TuneStatus ( const QString &  serial)
protected

Definition at line 180 of file MythExternControl.cpp.

Referenced by ProcessCommand().

◆ LoadChannels()

void Commands::LoadChannels ( const QString &  serial)
protected

Definition at line 185 of file MythExternControl.cpp.

Referenced by ProcessCommand().

◆ FirstChannel()

void Commands::FirstChannel ( const QString &  serial)
protected

Definition at line 190 of file MythExternControl.cpp.

Referenced by ProcessCommand().

◆ NextChannel()

void Commands::NextChannel ( const QString &  serial)
protected

Definition at line 195 of file MythExternControl.cpp.

Referenced by ProcessCommand().

◆ Cleanup()

void Commands::Cleanup ( void  )
protected

Definition at line 200 of file MythExternControl.cpp.

Referenced by ProcessCommand().

◆ CloseFile

void Commands::CloseFile ( void  )
signal

Referenced by process_command().

◆ SendBytes

void Commands::SendBytes ( void  )
signal

Referenced by process_command(), and Run().

◆ Run() [2/2]

bool Commands::Run ( const QString &  filename,
int  data_rate,
bool  loopinput 
)

Definition at line 319 of file mythfilerecorder.cpp.

◆ setEoF()

void Commands::setEoF ( void  )
inline

Definition at line 65 of file mythfilerecorder.h.

Referenced by Streamer::SendBytes().

◆ send_status()

bool Commands::send_status ( const QString &  status) const
protected

Definition at line 170 of file mythfilerecorder.cpp.

Referenced by process_command().

◆ process_command()

bool Commands::process_command ( QString &  cmd)
protected

Definition at line 185 of file mythfilerecorder.cpp.

Referenced by Run().

Member Data Documentation

◆ m_thread

std::thread Commands::m_thread
private

Definition at line 114 of file MythExternControl.h.

Referenced by Join(), and Start().

◆ m_repCmdCnt

size_t Commands::m_repCmdCnt { 0 }
private

Definition at line 116 of file MythExternControl.h.

Referenced by SendStatus().

◆ m_prevStatus

QString Commands::m_prevStatus
private

Definition at line 117 of file MythExternControl.h.

Referenced by SendStatus().

◆ m_prevMsgBuf

QString Commands::m_prevMsgBuf
private

Definition at line 118 of file MythExternControl.h.

Referenced by SendStatus().

◆ m_parent

MythExternControl* Commands::m_parent { nullptr }
private

◆ m_apiVersion

int Commands::m_apiVersion { -1 }
private

Definition at line 121 of file MythExternControl.h.

Referenced by ProcessCommand().

◆ m_fileName

QString Commands::m_fileName
private

Definition at line 72 of file mythfilerecorder.h.

Referenced by Run().

◆ m_streamer

Streamer* Commands::m_streamer { nullptr }
private

Definition at line 73 of file mythfilerecorder.h.

Referenced by process_command(), and Run().

◆ m_timeout

int Commands::m_timeout { 10 }
private

Definition at line 74 of file mythfilerecorder.h.

Referenced by Run().

◆ m_run

bool Commands::m_run { true }
private

Definition at line 75 of file mythfilerecorder.h.

Referenced by Run().

◆ m_eof

QAtomicInt Commands::m_eof { 0 }
private

Definition at line 76 of file mythfilerecorder.h.

Referenced by process_command(), and setEoF().


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