📄 fwwebdevice.c
字号:
** RETURNS: OK if success, or ERROR if not */STATUS fwWebNotAnydaySet(void) { DBG_PRINT(("Set fwWebNotAnydaySet \n ")); if( pfwWebRule != NULL && fwWebNotAnytime) { if (fwWebNotAnyday == 0 ) pfwWebRule->timeOfDay.days = FW_DAY_ALL; } return OK; }/******************************************************************************* * fwWebNotAnytimeGet - Get the not any time choice of a rule entry * to display on the webscreen editing/adding table*** RETURNS: OK if success, or ERROR if not */STATUS fwWebNotAnytimeGet(void) { int ret = fwWebRuleFieldGet(FW_FIELD_TIME,FWWEB_DISPLAY_INDEX, (void *)&pfwWebRule->timeOfDay,"fwWebNotAnytimeGet"); if (ret == OK) { if ( pfwWebRule->timeOfDay.days == 0x0 ) fwWebNotAnytime = 0; else fwWebNotAnytime = 1; } else fwWebNotAnytime = 1; if (ret == ERROR) return ERROR; return OK; }/******************************************************************************* * fwWebNotAnydayGet - Get the not any day choice of a rule entry * to display on the webscreen editing/adding table*** RETURNS: OK if success, or ERROR if not */STATUS fwWebNotAnydayGet(void) { int ret = fwWebRuleFieldGet(FW_FIELD_TIME,FWWEB_DISPLAY_INDEX, (void *)&pfwWebRule->timeOfDay,"fwWebNotAnydayGet"); if (ret == OK) { if ( pfwWebRule->timeOfDay.days == FW_DAY_ALL ) fwWebNotAnyday = 0; else fwWebNotAnyday = 1; } else fwWebNotAnyday = 1; if (ret == ERROR) return ERROR; return OK; }/******************************************************************************* * fwWebSundaySet - Set the Sunday choice of time in a rule entry.*** RETURNS: OK if success, or ERROR if not */STATUS fwWebSundaySet(void) { DBG_PRINT(("Set fwWebSundaySet \n ")); if( pfwWebRule != NULL && fwWebNotAnytime && fwWebNotAnyday) { if (strcmp (fwWebSunday, "yes") == 0 ) pfwWebRule->timeOfDay.days |= FW_DAY_SUN; else pfwWebRule->timeOfDay.days &= (~FW_DAY_SUN & FW_DAY_ALL); } return OK; }/******************************************************************************* * fwWebMondaySet - Set the Monday choice of time in a rule entry.*** RETURNS: OK if success, or ERROR if not */STATUS fwWebMondaySet(void) { DBG_PRINT(("Set fwWebMondaySet \n ")); if( pfwWebRule != NULL && fwWebNotAnytime && fwWebNotAnyday) { if (strcmp (fwWebMonday, "yes") == 0 ) pfwWebRule->timeOfDay.days |= FW_DAY_MON; else pfwWebRule->timeOfDay.days &= (~FW_DAY_MON & FW_DAY_ALL); } return OK; }/******************************************************************************* * fwWebTuesdaySet - Set the Tuesday choice of time in a rule entry.*** RETURNS: OK if success, or ERROR if not */STATUS fwWebTuesdaySet(void) { DBG_PRINT(("Set fwWebTuesdaySet \n ")); if( pfwWebRule != NULL && fwWebNotAnytime && fwWebNotAnyday) { if (strcmp (fwWebTuesday, "yes") == 0 ) pfwWebRule->timeOfDay.days |= FW_DAY_TUE; else pfwWebRule->timeOfDay.days &= (~FW_DAY_TUE & FW_DAY_ALL); } return OK; }/******************************************************************************* * fwWebWednesdaySet - Set the Wednesday choice of time in a rule entry.*** RETURNS: OK if success, or ERROR if not */STATUS fwWebWednesdaySet(void) { DBG_PRINT(("Set fwWebWednesdaySet \n ")); if( pfwWebRule != NULL && fwWebNotAnytime && fwWebNotAnyday) { if (strcmp (fwWebWednesday, "yes") == 0 ) pfwWebRule->timeOfDay.days |= FW_DAY_WED; else pfwWebRule->timeOfDay.days &= (~FW_DAY_WED & FW_DAY_ALL); } return OK; }/******************************************************************************* * fwWebThursdaySet - Set the Thursday choice of time in a rule entry.*** RETURNS: OK if success, or ERROR if not */STATUS fwWebThursdaySet(void) { DBG_PRINT(("Set fwWebThursdaySet \n ")); if( pfwWebRule != NULL && fwWebNotAnytime && fwWebNotAnyday) { if (strcmp (fwWebThursday, "yes") == 0 ) pfwWebRule->timeOfDay.days |= FW_DAY_THU; else pfwWebRule->timeOfDay.days &= (~FW_DAY_THU & FW_DAY_ALL); } return OK; }/******************************************************************************* * fwWebFridaySet - Set the Friday choice of time in a rule entry.*** RETURNS: OK if success, or ERROR if not */STATUS fwWebFridaySet(void) { DBG_PRINT(("Set fwWebFridaySet \n ")); if( pfwWebRule != NULL && fwWebNotAnytime && fwWebNotAnyday) { if (strcmp (fwWebFriday, "yes") == 0 ) pfwWebRule->timeOfDay.days |= FW_DAY_FRI; else pfwWebRule->timeOfDay.days &= (~FW_DAY_FRI & FW_DAY_ALL); } return OK; }/******************************************************************************* * fwWebSaturdaySet - Set the Saturday choice of time in a rule entry.*** RETURNS: OK if success, or ERROR if not */STATUS fwWebSaturdaySet(void) { DBG_PRINT(("Set fwWebSaturdaySet \n ")); if( pfwWebRule != NULL && fwWebNotAnytime && fwWebNotAnyday) { if (strcmp (fwWebSaturday, "yes") == 0 ) pfwWebRule->timeOfDay.days |= FW_DAY_SAT; else pfwWebRule->timeOfDay.days &= (~FW_DAY_SAT & FW_DAY_ALL); } return OK; }/******************************************************************************* * fwWebSundayGet - Get the Sunday choice of a rule entry * to display on the webscreen editing/adding table*** RETURNS: OK if success, or ERROR if not */STATUS fwWebSundayGet(void) { int ret = fwWebRuleFieldGet(FW_FIELD_TIME,FWWEB_DISPLAY_INDEX, (void *)&pfwWebRule->timeOfDay,"fwWebSundayGet"); if (ret == OK) { if ( pfwWebRule->timeOfDay.days & FW_DAY_SUN ) strcpy(fwWebSunday, "yes"); else strcpy(fwWebSunday, "OFF"); } else strcpy(fwWebSunday, "OFF"); if (ret == ERROR) return ERROR; return OK; }/******************************************************************************* * fwWebMondayGet - Get the Monday choice of a rule entry * to display on the webscreen editing/adding table*** RETURNS: OK if success, or ERROR if not */STATUS fwWebMondayGet(void) { int ret = fwWebRuleFieldGet(FW_FIELD_TIME,FWWEB_DISPLAY_INDEX, (void *)&pfwWebRule->timeOfDay,"fwWebMondayGet"); if (ret == OK) { if ( pfwWebRule->timeOfDay.days & FW_DAY_MON ) strcpy(fwWebMonday, "yes"); else strcpy(fwWebMonday, "OFF"); } else strcpy(fwWebMonday, "OFF"); if (ret == ERROR) return ERROR; return OK; }/******************************************************************************* * fwWebTuesdayGet - Get the Tuesday choice of a rule entry * to display on the webscreen editing/adding table*** RETURNS: OK if success, or ERROR if not */STATUS fwWebTuesdayGet(void) { int ret = fwWebRuleFieldGet(FW_FIELD_TIME,FWWEB_DISPLAY_INDEX, (void *)&pfwWebRule->timeOfDay,"fwWebTuesdayGet"); if (ret == OK) { if ( pfwWebRule->timeOfDay.days & FW_DAY_TUE ) strcpy(fwWebTuesday, "yes"); else strcpy(fwWebTuesday, "OFF"); } else strcpy(fwWebTuesday, "OFF"); if (ret == ERROR) return ERROR; return OK; }/******************************************************************************* * fwWebWednesdayGet - Get the Wednesday choice of a rule entry * to display on the webscreen editing/adding table*** RETURNS: OK if success, or ERROR if not */STATUS fwWebWednesdayGet(void) { int ret = fwWebRuleFieldGet(FW_FIELD_TIME,FWWEB_DISPLAY_INDEX, (void *)&pfwWebRule->timeOfDay,"fwWebWednesdayGet"); if (ret == OK) { if ( pfwWebRule->timeOfDay.days & FW_DAY_WED ) strcpy(fwWebWednesday, "yes"); else strcpy(fwWebWednesday, "OFF"); } else strcpy(fwWebWednesday, "OFF"); if (ret == ERROR) return ERROR; return OK; }/******************************************************************************* * fwWebThursdayGet - Get the Thursday choice of a rule entry * to display on the webscreen editing/adding table*** RETURNS: OK if success, or ERROR if not */STATUS fwWebThursdayGet(void) { int ret = fwWebRuleFieldGet(FW_FIELD_TIME,FWWEB_DISPLAY_INDEX, (void *)&pfwWebRule->timeOfDay,"fwWebThursdayGet"); if (ret == OK) { if ( pfwWebRule->timeOfDay.days & FW_DAY_THU ) strcpy(fwWebThursday, "yes"); else strcpy(fwWebThursday, "OFF"); } else strcpy(fwWebThursday, "OFF"); if (ret == ERROR) return ERROR; return OK; }/******************************************************************************* * fwWebFridayGet - Get the Friday choice of a rule entry * to display on the webscreen editing/adding table*** RETURNS: OK if success, or ERROR if not */STATUS fwWebFridayGet(void) { int ret = fwWebRuleFieldGet(FW_FIELD_TIME,FWWEB_DISPLAY_INDEX, (void *)&pfwWebRule->timeOfDay,"fwWebFridayGet"); if (ret == OK) { if ( pfwWebRule->timeOfDay.days & FW_DAY_FRI ) strcpy(fwWebFriday, "yes"); else strcpy(fwWebFriday, "OFF"); } else strcpy(fwWebFriday, "OFF"); if (ret == ERROR) return ERROR; return OK; }/******************************************************************************* * fwWebSaturdayGet - Get the Saturday choice of a rule entry * to display on the webscreen editing/adding table*** RETURNS: OK if success, or ERROR if not */STATUS fwWebSaturdayGet(void) { int ret = fwWebRuleFieldGet(FW_FIELD_TIME,FWWEB_DISPLAY_INDEX, (void *)&pfwWebRule->tim
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -