本文整理汇总了C++中NamedList::getIntValue方法的典型用法代码示例。如果您正苦于以下问题:C++ NamedList::getIntValue方法的具体用法?C++ NamedList::getIntValue怎么用?C++ NamedList::getIntValue使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类NamedList
的用法示例。
在下文中一共展示了NamedList::getIntValue方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: c
void SS7Testing::setParams(const NamedList& params, bool setSeq)
{
if (!m_timer.interval() || params.getParam(YSTRING("interval")))
m_timer.interval(params,"interval",20,1000,true);
m_len = params.getIntValue(YSTRING("length"),m_len);
m_sharing = params.getBoolValue(YSTRING("sharing"),m_sharing);
if (m_len > 1024)
m_len = 1024;
if (setSeq || !m_seq)
m_seq = params.getIntValue(YSTRING("sequence"),m_seq);
const String* lbl = params.getParam(YSTRING("address"));
if (!TelEngine::null(lbl)) {
// TYPE,opc,dpc,sls,spare
SS7PointCode::Type t = SS7PointCode::Other;
ObjList* l = lbl->split(',');
const GenObject* o = l->at(0);
if (o) {
t = SS7PointCode::lookup(o->toString());
if (t == SS7PointCode::Other)
t = m_lbl.type();
}
if (t != SS7PointCode::Other) {
o = l->at(1);
if (o) {
SS7PointCode c(m_lbl.opc());
if (c.assign(o->toString(),t))
m_lbl.assign(t,m_lbl.dpc(),c,m_lbl.sls(),m_lbl.spare());
}
o = l->at(2);
if (o) {
SS7PointCode c(m_lbl.dpc());
if (c.assign(o->toString(),t))
m_lbl.assign(t,c,m_lbl.opc(),m_lbl.sls(),m_lbl.spare());
}
o = l->at(3);
if (o) {
int sls = o->toString().toInteger(-1);
if (sls >= 0)
m_lbl.setSls(sls);
}
o = l->at(4);
if (o) {
int spare = o->toString().toInteger(-1);
if (spare >= 0)
m_lbl.setSpare(spare);
}
}
delete l;
}
}
示例2: configure
void TestThread::configure(const NamedList& conf)
{
Lock mylock(this);
m_serverAddr = conf.getValue("addr", "0.0.0.0");
if(m_serverAddr == "0.0.0.0")
m_serverAddr = "127.0.0.1";
m_serverPort = conf.getIntValue("port", 80);
}
示例3: debugName
UART::UART(State state, const NamedList& params, const char* name)
: m_modem(params,this),
m_state(Idle),
m_error(ENone),
m_parity(0),
m_expectedParity(false),
m_accumulator(8)
{
debugName(name);
unsigned char dataBits = params.getIntValue("databits",8);
if (dataBits < 1 || dataBits > 8)
dataBits = 8;
m_accumulator.dataBits(dataBits);
m_parity = params.getIntValue("parity");
reset(state);
}
示例4: return
unsigned char SS7Layer4::getSIO(const NamedList& params, unsigned char sif, unsigned char prio, unsigned char ni)
{
if ((prio & 0x30) == 0)
prio <<= 4;
if ((ni & 0xc0) == 0)
ni <<= 6;
sif = params.getIntValue(YSTRING("service"),sif & 0x0f);
prio = SS7MSU::getPriority(params.getValue(YSTRING("priority")),prio & 0x30);
if ((prio & 0x30) == 0)
prio <<= 4;
ni = SS7MSU::getNetIndicator(params.getValue(YSTRING("netindicator")),ni & 0xc0);
if ((ni & 0xc0) == 0)
ni <<= 6;
return (sif & 0x0f) | (prio & 0x30) | (ni & 0xc0);
}
示例5: update
// Update members from a dispatched "chan.rtp" message
void SDPMedia::update(const NamedList& msg, bool pickFormat)
{
DDebug(DebugAll,"SDPMedia::update('%s',%s) [%p]",
msg.c_str(),String::boolText(pickFormat),this);
m_id = msg.getValue("rtpid",m_id);
m_lPort = msg.getValue("localport",m_lPort);
if (pickFormat) {
const char* format = msg.getValue("format");
if (format) {
m_format = format;
if ((m_formats != m_format) && (msg.getIntValue("remoteport") > 0)) {
Debug(DebugNote,"Choosing started '%s' format '%s' [%p]",
c_str(),format,this);
m_formats = m_format;
}
}
}
}