| 
														
															@@ -175,7 +175,7 @@ void UPS_CriticalAlarmMonitor(void) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   // Значение параметра изменилось
 
														 | 
														
														 | 
														
															   // Значение параметра изменилось
 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   if (CriticalAlarmCurrent != CriticalAlarmOldState)
 
														 | 
														
														 | 
														
															   if (CriticalAlarmCurrent != CriticalAlarmOldState)
 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   {
 
														 | 
														
														 | 
														
															   {
 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-	  if(OldRO0type_Sourse == CRITICAL){
 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+	  if(CurrRO1type_Sourse == CRITICAL){
 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 		  memset(str, 0, 30);
 
														 | 
														
														 | 
														
															 		  memset(str, 0, 30);
 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 		  if(CriticalAlarmCurrent){
 
														 | 
														
														 | 
														
															 		  if(CriticalAlarmCurrent){
 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 			  SetROInt(1, 0);
 
														 | 
														
														 | 
														
															 			  SetROInt(1, 0);
 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -188,7 +188,7 @@ void UPS_CriticalAlarmMonitor(void) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 		  SNMP_SendUserTrap(DO0_TOGGLED);
 
														 | 
														
														 | 
														
															 		  SNMP_SendUserTrap(DO0_TOGGLED);
 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 		  log_event_data(LOG_DO0_STATE, str);
 
														 | 
														
														 | 
														
															 		  log_event_data(LOG_DO0_STATE, str);
 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 	  }
 
														 | 
														
														 | 
														
															 	  }
 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-	  if(OldRO2type_Sourse == CRITICAL){
 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+	  if(CurrRO2type_Sourse == CRITICAL){
 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 		  memset(str, 0, 30);
 
														 | 
														
														 | 
														
															 		  memset(str, 0, 30);
 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 		  if(CriticalAlarmCurrent){
 
														 | 
														
														 | 
														
															 		  if(CriticalAlarmCurrent){
 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 			  SetROInt(1, 1);
 
														 | 
														
														 | 
														
															 			  SetROInt(1, 1);
 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -204,7 +204,7 @@ void UPS_CriticalAlarmMonitor(void) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   }
 
														 | 
														
														 | 
														
															   }
 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   else
 
														 | 
														
														 | 
														
															   else
 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   {
 
														 | 
														
														 | 
														
															   {
 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-	  if(OldRO0type_Sourse == CRITICAL && OldRO0type_Sourse != OldRO0type_Sourse){
 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+	  if(CurrRO1type_Sourse == CRITICAL && CurrRO1type_Sourse != OldRO0type_Sourse){
 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 		  memset(str, 0, 30);
 
														 | 
														
														 | 
														
															 		  memset(str, 0, 30);
 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 		  if(CriticalAlarmCurrent){
 
														 | 
														
														 | 
														
															 		  if(CriticalAlarmCurrent){
 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 			  SetROInt(1, 0);
 
														 | 
														
														 | 
														
															 			  SetROInt(1, 0);
 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -217,7 +217,7 @@ void UPS_CriticalAlarmMonitor(void) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 		  SNMP_SendUserTrap(DO0_TOGGLED);
 
														 | 
														
														 | 
														
															 		  SNMP_SendUserTrap(DO0_TOGGLED);
 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 		  log_event_data(LOG_DO0_STATE, str);
 
														 | 
														
														 | 
														
															 		  log_event_data(LOG_DO0_STATE, str);
 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 	  }
 
														 | 
														
														 | 
														
															 	  }
 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-	  if(OldRO2type_Sourse == CRITICAL && OldRO2type_Sourse != OldRO2type_Sourse){
 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+	  if(CurrRO2type_Sourse == CRITICAL && CurrRO2type_Sourse != OldRO2type_Sourse){
 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 		  memset(str, 0, 30);
 
														 | 
														
														 | 
														
															 		  memset(str, 0, 30);
 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 		  if(CriticalAlarmCurrent){
 
														 | 
														
														 | 
														
															 		  if(CriticalAlarmCurrent){
 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 			  SetROInt(1, 1);
 
														 | 
														
														 | 
														
															 			  SetROInt(1, 1);
 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -281,7 +281,7 @@ void UPS_NonCriticalAlarmMonitor(void) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   // Значение параметра изменилось
 
														 | 
														
														 | 
														
															   // Значение параметра изменилось
 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   if (NonCriticalAlarmCurrent != NonCriticalAlarmOldState)
 
														 | 
														
														 | 
														
															   if (NonCriticalAlarmCurrent != NonCriticalAlarmOldState)
 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   {
 
														 | 
														
														 | 
														
															   {
 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-	  if(OldRO0type_Sourse == NON_CRITICAL){
 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+	  if(CurrRO1type_Sourse == NON_CRITICAL){
 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 		  memset(str, 0, 30);
 
														 | 
														
														 | 
														
															 		  memset(str, 0, 30);
 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 		  if(NonCriticalAlarmCurrent){
 
														 | 
														
														 | 
														
															 		  if(NonCriticalAlarmCurrent){
 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 			  SetROInt(1, 0);
 
														 | 
														
														 | 
														
															 			  SetROInt(1, 0);
 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -294,15 +294,15 @@ void UPS_NonCriticalAlarmMonitor(void) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 		  SNMP_SendUserTrap(DO0_TOGGLED);
 
														 | 
														
														 | 
														
															 		  SNMP_SendUserTrap(DO0_TOGGLED);
 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 		  log_event_data(LOG_DO0_STATE, str);
 
														 | 
														
														 | 
														
															 		  log_event_data(LOG_DO0_STATE, str);
 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 	  }
 
														 | 
														
														 | 
														
															 	  }
 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-	  if(OldRO2type_Sourse == NON_CRITICAL){
 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+	  if(CurrRO2type_Sourse == NON_CRITICAL){
 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 		  memset(str, 0, 30);
 
														 | 
														
														 | 
														
															 		  memset(str, 0, 30);
 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 		  if(NonCriticalAlarmCurrent){
 
														 | 
														
														 | 
														
															 		  if(NonCriticalAlarmCurrent){
 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 			  SetROInt(1, 1);
 
														 | 
														
														 | 
														
															 			  SetROInt(1, 1);
 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-			  strcat(str, "Разомкнуто");
 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+			  strcat(str, "Замкнуто");
 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 		  }
 
														 | 
														
														 | 
														
															 		  }
 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 		  else{
 
														 | 
														
														 | 
														
															 		  else{
 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 			  SetROInt(0, 1);
 
														 | 
														
														 | 
														
															 			  SetROInt(0, 1);
 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-			  strcat(str, "Замкнуто");
 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+			  strcat(str, "Разомкнуто");
 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 		  }
 
														 | 
														
														 | 
														
															 		  }
 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 	  	  SNMP_SendUserTrap(DO1_TOGGLED);
 
														 | 
														
														 | 
														
															 	  	  SNMP_SendUserTrap(DO1_TOGGLED);
 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 	  	log_event_data(LOG_DO1_STATE, str);
 
														 | 
														
														 | 
														
															 	  	log_event_data(LOG_DO1_STATE, str);
 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -310,7 +310,7 @@ void UPS_NonCriticalAlarmMonitor(void) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   }
 
														 | 
														
														 | 
														
															   }
 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   else
 
														 | 
														
														 | 
														
															   else
 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   {
 
														 | 
														
														 | 
														
															   {
 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-	  if(OldRO0type_Sourse == NON_CRITICAL && OldRO0type_Sourse != OldRO0type_Sourse){
 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+	  if(CurrRO1type_Sourse == NON_CRITICAL && CurrRO1type_Sourse != OldRO0type_Sourse){
 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 		  memset(str, 0, 30);
 
														 | 
														
														 | 
														
															 		  memset(str, 0, 30);
 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 		  if(NonCriticalAlarmCurrent){
 
														 | 
														
														 | 
														
															 		  if(NonCriticalAlarmCurrent){
 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 			  SetROInt(1, 0);
 
														 | 
														
														 | 
														
															 			  SetROInt(1, 0);
 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -323,7 +323,7 @@ void UPS_NonCriticalAlarmMonitor(void) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 		  SNMP_SendUserTrap(DO0_TOGGLED);
 
														 | 
														
														 | 
														
															 		  SNMP_SendUserTrap(DO0_TOGGLED);
 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 		  log_event_data(LOG_DO0_STATE, str);
 
														 | 
														
														 | 
														
															 		  log_event_data(LOG_DO0_STATE, str);
 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 	  }
 
														 | 
														
														 | 
														
															 	  }
 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-	  if(OldRO2type_Sourse == NON_CRITICAL && OldRO2type_Sourse != OldRO2type_Sourse){
 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+	  if(CurrRO2type_Sourse == NON_CRITICAL && CurrRO2type_Sourse != OldRO2type_Sourse){
 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 		  memset(str, 0, 30);
 
														 | 
														
														 | 
														
															 		  memset(str, 0, 30);
 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 		  if(NonCriticalAlarmCurrent){
 
														 | 
														
														 | 
														
															 		  if(NonCriticalAlarmCurrent){
 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 			  SetROInt(1, 1);
 
														 | 
														
														 | 
														
															 			  SetROInt(1, 1);
 
														 |