Example #1
0
int GroupTagSubscription::getHistoryRequest (const char * pszGroupName, PtrLList<HistoryRequest> &historyRequest)
{
    UInt32Hashtable<TagInfo>::Iterator i = _ui16Tags.getAllElements();
    TagInfo *pTI;
    History *pHistory;
    while (!i.end()) {
        pTI = i.getValue();
        pHistory = pTI->pHistory;
        if (pHistory) {
            if (pHistory->isExpired()) {
                delete pHistory;
                pHistory = NULL;
            }
            else {
                HistoryRequestGroupTag * pReq = new HistoryRequestGroupTag;
                pReq->_pHistory = pTI->pHistory;
                pReq->_pszGroupName = pszGroupName;
                pReq->_ui16Tag = (uint16) i.getKey();
                historyRequest.prepend(pReq);
            }
        }
        i.nextElement();
    }
    return 0;
}
Example #2
0
int GroupSubscription::getHistoryRequest (const char * pszGroupName, PtrLList<HistoryRequest> &historyRequest)
{
    HistoryRequestGroupTag * pReq = new HistoryRequestGroupTag;
    pReq->_pHistory = _pHistory;
    pReq->_pszGroupName = pszGroupName;
    pReq->_ui16Tag = 0;
    historyRequest.prepend(pReq);
    return 0;
}
Example #3
0
int GroupPredicateSubscription::getHistoryRequest (const char * pszGroupName, PtrLList<HistoryRequest> &historyRequest)
{
    HistoryRequestPredicate * pReq = new HistoryRequestPredicate;
    pReq->_pHistory = _pHistory;
    pReq->_pszGroupName = pszGroupName;
    pReq->ui8PredicateType = _ui8PredicateType;
    pReq->_pszPredicate =  _predicate;
    historyRequest.prepend (pReq);
    return 0;
}