mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-07-09 00:47:46 +02:00
2017-06-05 Fred Gleason <fredg@paravelsystems.com>
* Added a 'Air Gate' ['AG'] RML.
This commit is contained in:
parent
ddee26a1f1
commit
5ab1be62e4
@ -15822,3 +15822,5 @@
|
||||
2017-06-05 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Modified the 'Command Send' ['CC'] RML so as to have a destination
|
||||
argument of 'localhost' be sent to the localhost.
|
||||
2017-06-05 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Added a 'Air Gate' ['AG'] RML.
|
||||
|
@ -181,6 +181,33 @@
|
||||
|
||||
<sect1>
|
||||
<title>Commands</title>
|
||||
<sect2>
|
||||
<title><command>Air Gate [AG]</command></title>
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>Module</term>
|
||||
<listitem><command>ripcd</command><manvolnum>8</manvolnum></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>Mnemonic</term>
|
||||
<listitem><userinput>AG</userinput></listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
<para>
|
||||
Process an RML only if the On-Air flag is ON.
|
||||
</para>
|
||||
<para>
|
||||
<userinput>AG</userinput>
|
||||
<replaceable>rml</replaceable>!
|
||||
</para>
|
||||
<para>
|
||||
Execute RML <replaceable>rml</replaceable> only if the On-Air flag on
|
||||
the local machine is ON.
|
||||
</para>
|
||||
</sect2>
|
||||
|
||||
<sect2>
|
||||
<title><command>Add Next [PX]</command></title>
|
||||
<para>
|
||||
|
@ -161,6 +161,7 @@ bool RDMacro::parseString(const char *str,int n)
|
||||
//
|
||||
rml_cmd=(RDMacro::Command)((str[0]<<8)+str[1]);
|
||||
switch(rml_cmd) {
|
||||
case RDMacro::AG:
|
||||
case RDMacro::AL:
|
||||
case RDMacro::BO:
|
||||
case RDMacro::CC:
|
||||
|
@ -35,16 +35,17 @@
|
||||
class RDMacro
|
||||
{
|
||||
public:
|
||||
enum Command {AL=0x414C,BO=0x424F,CC=0x4343,CE=0x4345,CL=0x434C,CP=0x4350,
|
||||
DB=0x4442,DL=0x444C,DP=0x4450,DS=0x4453,DX=0x4458,EX=0x4558,
|
||||
FS=0x4653,GE=0x4745,GI=0x4749,GO=0x474F,JC=0x4A43,JD=0x4A44,
|
||||
LB=0x4C42,LC=0x4C43,LL=0x4C4C,LO=0x4C4F,MB=0x4D42,MD=0x4D44,
|
||||
MN=0x4D4E,MT=0x4D54,NN=0x4E4E,PB=0x5042,PC=0x5043,PD=0x5044,
|
||||
PE=0x5045,PL=0x504C,PM=0x504D,PN=0x504E,PP=0x5050,PS=0x5053,
|
||||
PT=0x5054,PU=0x5055,PW=0x5057,PX=0x5058,RL=0x524C,RN=0x524E,
|
||||
RS=0x5253,RR=0x5252,SA=0x5341,SC=0x5343,SD=0x5344,SG=0x5347,
|
||||
SI=0x5349,SL=0x534C,SN=0x534e,SO=0x534F,SP=0x5350,SR=0x5352,
|
||||
ST=0x5354,SX=0x5358,SY=0x5359,SZ=0x535A,TA=0x5441,UO=0x554F};
|
||||
enum Command {AG=0x4147,AL=0x414C,BO=0x424F,CC=0x4343,CE=0x4345,CL=0x434C,
|
||||
CP=0x4350,DB=0x4442,DL=0x444C,DP=0x4450,DS=0x4453,DX=0x4458,
|
||||
EX=0x4558,FS=0x4653,GE=0x4745,GI=0x4749,GO=0x474F,JC=0x4A43,
|
||||
JD=0x4A44,LB=0x4C42,LC=0x4C43,LL=0x4C4C,LO=0x4C4F,MB=0x4D42,
|
||||
MD=0x4D44,MN=0x4D4E,MT=0x4D54,NN=0x4E4E,PB=0x5042,PC=0x5043,
|
||||
PD=0x5044,PE=0x5045,PL=0x504C,PM=0x504D,PN=0x504E,PP=0x5050,
|
||||
PS=0x5053,PT=0x5054,PU=0x5055,PW=0x5057,PX=0x5058,RL=0x524C,
|
||||
RN=0x524E,RS=0x5253,RR=0x5252,SA=0x5341,SC=0x5343,SD=0x5344,
|
||||
SG=0x5347,SI=0x5349,SL=0x534C,SN=0x534e,SO=0x534F,SP=0x5350,
|
||||
SR=0x5352,ST=0x5354,SX=0x5358,SY=0x5359,SZ=0x535A,TA=0x5441,
|
||||
UO=0x554F};
|
||||
enum Role {Invalid=0,Cmd=1,Reply=2};
|
||||
RDMacro();
|
||||
RDMacro::Role role() const;
|
||||
|
@ -24,6 +24,7 @@
|
||||
#include <qdir.h>
|
||||
#include <qsessionmanager.h>
|
||||
#include <qsignalmapper.h>
|
||||
#include <qstringlist.h>
|
||||
|
||||
#include <unistd.h>
|
||||
#include <stdio.h>
|
||||
@ -701,6 +702,22 @@ void MainObject::ReadRmlSocket(QSocketDevice *dev,RDMacro::Role role,
|
||||
while((n=dev->readBlock(buffer,RD_RML_MAX_LENGTH))>0) {
|
||||
buffer[n]=0;
|
||||
if(macro.parseString(buffer,n)) {
|
||||
if(macro.command()==RDMacro::AG) {
|
||||
if(ripc_onair_flag) {
|
||||
QStringList f0=f0.split(" ",buffer);
|
||||
f0.pop_front();
|
||||
QString rmlstr=f0.join(" ");
|
||||
if(!macro.parseString(rmlstr,rmlstr.length())) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
else {
|
||||
LogLine(RDConfig::LogDebug,
|
||||
QString("rejected rml: \"")+buffer+
|
||||
"\": on-air flag not active");
|
||||
break;
|
||||
}
|
||||
}
|
||||
macro.setRole(role);
|
||||
macro.setAddress(dev->peerAddress());
|
||||
macro.setEchoRequested(echo);
|
||||
|
Loading…
x
Reference in New Issue
Block a user