kopia lustrzana https://github.com/weetmuts/wmbusmeters
				
				
				
			Fix so that info from xmq driver is printed with --listfields=<driver>
							rodzic
							
								
									cd20555c63
								
							
						
					
					
						commit
						aaf45d8bcd
					
				|  | @ -76,7 +76,8 @@ driver { | |||
|     field { | ||||
|         name     = status | ||||
|         quantity = Text | ||||
|         info     = status_and_error_flags | ||||
|         info     = 'Status and error flags.' | ||||
|         attributes = INCLUDE_TPL_STATUS | ||||
|         match { | ||||
|             measurement_type = Instantaneous | ||||
|             vif_range        = ErrorFlags | ||||
|  |  | |||
|  | @ -28,6 +28,7 @@ string check_default_fields(const char *fields, string file); | |||
| void check_detection_triplets(DriverInfo *di, string file); | ||||
| 
 | ||||
| string check_field_name(const char *name, DriverDynamic *dd); | ||||
| string check_field_info(const char *info, DriverDynamic *dd); | ||||
| Quantity check_field_quantity(const char *quantity_s, DriverDynamic *dd); | ||||
| VifScaling check_vif_scaling(const char *vif_scaling_s, DriverDynamic *dd); | ||||
| DifSignedness check_dif_signedness(const char *dif_signedness_s, DriverDynamic *dd); | ||||
|  | @ -277,8 +278,8 @@ XMQProceed DriverDynamic::add_field(XMQDoc *doc, XMQNode *field, DriverDynamic * | |||
|     // The properties are by default empty but can be specified for specific fields.
 | ||||
|     PrintProperties properties = check_print_properties(xmqGetStringRel(doc, "attributes", field), dd); | ||||
| 
 | ||||
|     // The about fields explains what the value is for. Ie. is storage 1 the previous day or month value etc.
 | ||||
|     string info = get_translation(doc, field, "about", language()); | ||||
|     // The info fields explains what the value is for. Ie. is storage 1 the previous day or month value etc.
 | ||||
|     string info = check_field_info(xmqGetStringRel(doc, "info", field), dd); | ||||
| 
 | ||||
|     // The calculate formula is optional.
 | ||||
|     string calculate = check_calculate(xmqGetStringRel(doc, "calculate", field), dd); | ||||
|  | @ -600,6 +601,13 @@ string check_field_name(const char *name, DriverDynamic *dd) | |||
|     return name; | ||||
| } | ||||
| 
 | ||||
| string check_field_info(const char *info, DriverDynamic *dd) | ||||
| { | ||||
|     if (!info) return ""; | ||||
| 
 | ||||
|     return info; | ||||
| } | ||||
| 
 | ||||
| Quantity check_field_quantity(const char *quantity_s, DriverDynamic *dd) | ||||
| { | ||||
|     if (!quantity_s) | ||||
|  |  | |||
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
		Ładowanie…
	
		Reference in New Issue
	
	 Fredrik Öhrström
						Fredrik Öhrström