Esempio n. 1
0
bool NTScalar::attachAlarm(PVAlarm &pvAlarm) const
{
    PVStructurePtr al = getAlarm();
    if (al)
        return pvAlarm.attach(al);
    else
        return false;
}
Esempio n. 2
0
/*
 * ����澯 �澯Դ�����źŵIJɼ�
 * ���澯���ƣ�����Ϊ�޸澯
 */
void BAlarmSource::processAlarm(void) {
    if( ifSrcRestrain() ) {
        //���澯Դ�����ƣ������и澯�źŰ��޸澯����
        INSMap::iterator it = InsGroup.begin();
        while( it != InsGroup.end() ) {
            it->second->setAlarm(false);
            it++;
        }
        return;
    }
    INSMap::iterator it = InsGroup.begin();
    while( it != InsGroup.end() ) {
        it->second->setAlarm(getAlarm(it->first));
        it++;
    }
}
Esempio n. 3
0
void displayAlarm(char idx)
{
    if (idx == -1){
        currentViewDisplay = DISPLAY_DateTime;
    }
	int i;

    char str[16];
    struct _alarm *am = getAlarm(idx);

    sprintf(str, "    %02d:%02d:%02d    ", am->time.tm_hour, am->time.tm_min, am->time.tm_sec);
    (*write_display_ptr[0])(str, 16);

    char str2[16];
	for (i = 0; i < 16;i++){
		str2[i] = am->name[i];
	}
		

    (*write_display_ptr[1])(str2, 16);
}
Esempio n. 4
0
byte Rtc_Pcf8563::getAlarmWeekday() {
    getAlarm();
    return alarm_weekday;
}
Esempio n. 5
0
byte Rtc_Pcf8563::getAlarmDay() {
    getAlarm();
    return alarm_day;
}
Esempio n. 6
0
byte Rtc_Pcf8563::getAlarmHour() {
    getAlarm();
    return alarm_hour;
}
Esempio n. 7
0
byte Rtc_Pcf8563::getAlarmMinute() {
    getAlarm();
    return alarm_minute;
}
Esempio n. 8
0
string CTodo::toString()
{
    CAlarm *pAlarm;
    CRecurrence *cRec;
    string szRet;
    string szTemp;
    time_t temp = 0;
    std::stringstream ss;
    ss << "ID=";
    if (getId().c_str()){
	szTemp= getId().substr(0,100);
	ss << szTemp;
	szTemp.clear();
    }
    else
	ss << NULL_STRING;

    ss << ",CalendarId=";
    ss << getCalendarId();

    ss << ",summary=";
    if (getSummary().c_str()){
	szTemp= getSummary().substr(0,100);
	ss << szTemp;
	szTemp.clear();
    }

    else
	ss << NULL_STRING;
    ss << ",description=";
    if (getDescription().c_str()){
	szTemp= getDescription().substr(0,100);
	ss << szTemp;
	szTemp.clear();
    }

    else
	ss << NULL_STRING;
    ss << ",location=";
    if (getLocation().c_str()){
	szTemp= getLocation().substr(0,100);
	ss << szTemp;
	szTemp.clear();
    }

    else
	ss << NULL_STRING;
    ss << ",UId=";
    if (getGUid().c_str()){
	szTemp= getGUid().substr(0,100);
	ss << szTemp;
	szTemp.clear();
    }
    else
	ss << NULL_STRING;

    ss << ",TimeZone=";
    if (getTzid().c_str()){
	szTemp= getTzid().substr(0,100);
	ss << szTemp;
	szTemp.clear();
    }
    else
	ss << NULL_STRING;
    ss << ",Type=";
    ss << getType() ;
    ss << ",Flags=";
    switch (getFlags()){
	case HAS_ATTENDEE:
	    ss << "Has Attendee";
	    break;
	case HAS_ORGANIZER:
	    ss << "Has Organizer";
	    break;
	case HAS_RECURRENCE:
	    ss << "Has Recurrence";
	    break;
	case HAS_ALARM:
	    ss << "Has Alarm";
	    break;
	case HAS_RECURRENCE_ALARM :
	    ss << "Has Recurrent Alarm";
	    break;
	case HAS_PARTICIPANT :
	    ss << "Has Participant";
	    break;
	case HAS_CATEGORIES :
	    ss << "Has Categories";
	    break;
	case HAS_COMMENT:
	    ss << "Has Comment ";
	    break;
	case HAS_EXTRA:
	    ss << "Has Extra ";
	    break;
	default:
	    break;
    }

    ss << ",Status=";
    ss << getStatus();
    ss << ",Start date=";
    temp = getDateStart();
    ss << ctime(&temp);
    ss << ",End date=";
    temp = getDateEnd();
    ss << ctime(&temp);
    ss << ",Last modified=";
    temp = getLastModified();
    ss << ctime(&temp);
    ss << ",created=";
    temp = getCreatedTime();
    ss << ctime(&temp);
    ss << ",until=";
    temp = getUntil();
    ss << ctime(&temp);

    ss << ",All day=";
    ss << getAllDay();
    ss << ",Geo=";
    if (szGeo.c_str()){
	szTemp= szGeo.substr(0,100);
	ss << szTemp;
	szTemp.clear();
    }
    else
	ss << NULL_STRING;

    ss << ",TodoDue=";
    ss << iDue;
    ss << ",Completed=";
    ss << iCompleted;
    ss << ",Percent";
    ss << iPercentComplete;
    ss << ",Priority";
    ss << iPriority;
    pAlarm=getAlarm();
    if(pAlarm)
	ss << pAlarm->toString();
    else
	ss << ",Alarm=NULL";
    cRec=getRecurrence();
    if(cRec)
	ss << cRec->toString();
    else
	ss << ",Rec=NULL";

    szRet.append(ss.str());
    return szRet;
}