Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore
Alarm messages
Power correction constants
Threshold for power correction EMEA version
Threshold for power correction NA version
Minimum region radio current NA
Minimum region radio current sensus radio RF mode EMEA
Minimum region radio current sensus radio TFX mode EMEA
Fixed current in production if production values are not logged in DB
and dispatched as 0 or null.
Fixed region radio current NA
Fixed region radio current sensus radio RF mode EMEA
Fixed region radio current sensus radio RF mode EMEA
Fixed region radio current sensus radio TFX mode EMEA
Pulse report length for pulse mode 1 to 4 even distribution 0
Pulse report length for pulse mode 1 to 4 even distribution 1
Pulse report length for pulse mode 5 to 6 even distribution 0
Pulse report length for pulse mode 5 to 6 even distribution 1
TFX mode mask of sensus radio system state
Update capability check for all necessary settings according to meter.
It is allowed to upgrade the metrology, causing an upgrade capability check to pass always.
The name of the metrology application.
Common definition for Meter handling in production and on test benches
represents any error state a meter can have
if hash code is 0 everything is running
is Flags, so watch out to check with hasFlag!
everything is good
problems on initialization
problems on Measurement
Problem on communication with meter
Problem on optical output on meter
if pulse can not readout
no (or no good) reference flow available
Calibration went wrong
calibration is out of range. Check documentation from meter to find limitation
blue screen like error
Streaming modes that supported by genesis meter.
Set meter to this Streaming mode means that , the meter pushes mode-specific record to port without any responses
Test mode with raw record to log.
Should give one
3 times and
one
Test mode with raw record to log. Should give one
3 times and repeat this till led mode is switch
Test mode should give out
Calibration mode should give out
Deactivate streaming
not set or an new not supported Streaming mode
Interface of special GenesisMeter derived from IMeter
Represent
proposed for login
A new meter has to be checked for the reboot counter. On retries the reboot counter
may have increased on unsuccessfully after-reboot procedure. This would force failing
the 'ConnectCordonel'.
Interface information
This FW version is supported by the interface "configuration.json".
Transmit protocol access for underlie objects to change response timeout
List of all present meter applications installed in meter
Successfully logged on to meter
Core revision of boot code.
Core revision of boot code as string.
This is the FLEXNETVERSION version which describes the entire packet.
This is the FLEXNETVERSION version which describes the entire packet.
This is the Metrology Lookup Table CRC.
This is the meter size.
Length of the meter.
Pressure sensor assembled to meter.
Region (EMEA, NA or China).
Radio frequency in MHz (433 or 868 or null).
Metrology upgrade permission.
Order number under which this meter has to be produced
Radio address
Process configuration
Customer serial number for informal issues
Unlocked the property change ability for special sequences.
Check region and size.
After reading the version, all valid registers are going to be selected.
Unlocked the property change ability for special sequences.
Set the meter size if previously unlocked.
The data types are: - String like "DN50" or
Set the pressure sensor if previously unlocked
Reset the empty pipe alarm
Upload app list to database
Clear password to force new password reading
Executes all StoreConfiguration and StoreCalibration for each application.
true if all configurations are stored
Login with identical password as last time to avoid get password from database
Returns meter registers
Common routine for reboot being able to override this routine which will be called in
MeteResetPsu to simulate a reboot.
Write Register, optional: wait for result and validate,
write register will ALWAYS log the data DON'T use for password write
Data type of Register
Register name
Value to save as byte array in raw format
wait until result is ready
check the content of the register by read back
skip retries on this error code return
true on successful operation
Read Register and return byte array
Register name
expected length for response
skip retries on this error code return
value as byte array in raw format or null
Clear all pending alarms.
- Initial.
Collection of interface information
The interface version
List of supported FW versions by this interface
Read of required registers and calculation of power correction
Ctor
true if successful
Calculate the values for power correction
true if successful
- Initial
Calculate the values for power correction
true if successful
- Initial
Power correction parameters used for overestimated power consumption on
Cordonel FW update from:
EMEA below R1.3.x
NA below R2.0.07
Unique identification of PCB
Date time UTC at EOL - Production
Total used seconds at EOL - Production
Total used charge of batteries at EOL - Production
Radio system state at EOL - Production
Pulse adapter was installed during at EOL - Production VAKO
Pulse mode during at EOL - Production
Pulse sequence counter during at EOL - Production
Pulse distribution at EOL - Production
Detected FW version before maintenance
Date time UTC at time of maintenance
Total used seconds of entire runtime
Total used charge of batteries of entire runtime
Actual detected radio system state at maintenance
Detection of pulse adapter installation
Pulse mode during maintenance
Pulse sequence counter during maintenance
Pulse distribution during maintenance
Mark pulse adapter as installed on any detected or sequence counted
Remind battery quantity used for estimation of drained load
Remind battery initial load used for estimation of drained load
FW version for the update
Calculated pulse report length
Total used seconds after EOL and before maintenance
Overestimated total used charge before maintenance
Based on fixed estimation total used charge before maintenance
Lowest threshold for total used charge calculated during maintenance
Corrected total used charge during maintenance
Genesis meter, main class for all action that occurs on production life of meter
one meter always have a linked port for UART communication and one for LED (even if you don't need them)
it´s has to be open for vb6 COM so don't use any record types or objects that vb6 didn't understand or
interprets differently than dotNet
Default constructor.
R.Drabesch, 2018-Feb-16.
Slot number for test-bench
for request Port
for streaming Port
don´t send CRC error or telegrams with error flag to caller
If you have a password for highest access level you need, if you don't want to access the meter
(just read led record) than you can leave it null
Keep up the highest access level for all function in where used
Logout with level 0
Minimal length for PcbId
The quiescent current threshold is the absolut minimal threshold for current consumption´in micro-Ampere.
This will be used to decide that the current isn't below for operational calculations of power consumption.
Logger for NLog
Optional request to use the offline passwords
source of slot config
source of password
Request communication port configuration.
Used for request/response communication with the meter.
Streaming communication port configuration.
Used for continuous data streaming communication.
if application have a access to online Genesis services
Remind the offline password for comparison if this is actively used
Process configuration
Transmit protocol access for underlie objects to change response timeout
Customer serial number for informal issues
Save Slot Number (position at test-bench) for logging purposes
Radio frequency in MHz (433 or 868 or null).
Metrology upgrade permission.
Add on ctor a password, it will be used for login in if no other password is set
reminder for last communication acknowledge code to detect communication errors
default false only enabled by
when it is true, the meter will enforce the login when session is gone or access is denied
Enable raw record logging, if set every incoming package will be logged
Detected pulse adapter communication on request port
Enable use of registers that are not valid (last version not match the current app)
All parameters stored in the SOFTWARE of GenesisMeter: NOT IN THE METER
if you want to read them from meter use
if you want to set them to meter use
All applications defined by configuration.json
request port assignment/info
request protocol assignment/info
streaming port assignment/info
streaming protocol assignment/info
to reduce the IrdA communication in test bench, preparation will be done once (when SkipPreparationForTestBench is true)
Response received after request for record
do not use it to set ProcessStatus
if you want to change ProcessStatus of this genesis use
is just store for some routines
if state is change
will be invoked.
on some states other events will be invoked as well
do not use it to set ErrorStatus
if you want to change ErrorStatus of this genesis use
is just store for some routines
fires up
Logged in to device
Logged in to device
Hold the current process name e.g. FlowTest, Preadjustment for logging
Unlocked the property change ability for special sequences.
Unlocked the property change ability for special sequences.
true if unlock required
true if possible
Set the meter size if previously unlocked
true if possible
Set the pressure sensor if previously unlocked
true if setting is allow
true if possible
Returns meter registers
Setup water meter from configuration file:
-slot,
-streaming protocol,
-streaming port
-request port
Setup water meter from parameters (no config file):
- slot
- request port
- streaming port
just internal setup. called on ctor or from vb6 setup function
Slot Number for test-bench
for RFID/UART/IrDA Port
for LED Port
don´t send CRC error or telegrams with error flag to caller
If you have a password for highest access level you need, if you don't want to access the meter
(just read led record) than you can leave it nullS
Start Event listening, has to be called after
Add a port to working queue
On should one once added in runtime
Synchronization of the record for the streaming interface
call this if session is expired and you need a re-authorization
A helper to invoke events only if someone is listening, otherwise nothing will happen
Event handler to call
Sender (can be null)
Event arguments (can be null)
Track all incoming led record packages (Calibration and Flow)
I should be or
otherwise this method does nothing
tracking request record processing
QueryCaps can send before login
arrange record for communication (e.g. Baud rate)
Running outgoing command
The backup login level is needed for re-authorization
SetRegister to loginLvl and wait for response
true = process command; false = add command to list. call
to process login command
if is completed and no error occurred it is true
Set
if null , use password from initialization
true = process command; false = add command to list. call
to process login command
Clear password to force new password reading
- Initial.
Acquires the password from WEB-API.
password
- Initial.
- PcbId handling improved.
- PcbId unknown returns immediately.
- Password had been reset to empty string if read from file, corrected!
- Used
- Optional the offline passwords will be used.
- BUGFIX: Avoid request of password from DB if offline password usage fored.
Get password from server
- Initial
- Immediately returns if already logged in.
Starting a timer to keep session active,
starting the .
password string to log in
true = process command; false = add command to list. call
to process login command
pass runImmediately for auto login
- Avoid retries during login, a retry will lock the Genesis for 2s, 4s, 8s, 16s and so on.
- Quick login removed.
- Pulse module deactivated at login.
- REMOVED: Pulse module deactivated at login.
- Skip FW readout to quickly connect being able to immediately switch off the pulse mode before App detection.
Building the FW Version:
- string like "R1.1.07" or "B1.1.07" or optional reduced form for configuration capability check "1107",
- hexadecimal version like 0x1107 or 0x9107 for the 'B' version.
Input:
- optional string like "1107", "11.07", "R1.1.07", "B1.1.07", "1.3.0B" or "9.0.2D".
- optional 2 bytes representing the msb and lsb like 0x11 and 0x07.
REASON: FLEXNETVERSION is one application which does not follow the same rule of decimal numbers.
Instead, it uses hexadecimal digits.
version as hexadecimal result of version e.g. 0x1107 or 0x130B
any string to evaluate like "11.07" or "R1.1.07" or "1.3.0B"
most significant byte representing the major and minor version
last significant byte representing the built version
will force to reduce the string output of FW version to e.g. "1107"
FLEXNET version string e.g. "R1.2.47" or "B1.2.0C"
- Initial.
- Removed the optional leading "B" or "R" on strVersion input to create the fwVersion.
- .
Building the FW Version string out of 2 bytes of data and a decimal version.
Example:
Inputs msb = 2, msb = 34,
Outputs fwVersion = 234, string "2.34"
firmware version as decimal e.g. 234
most significant byte hex
last significant byte hex
converted as string e.g. "2.34" or "2.0C"
- Initial.
Building the FW Version string out of UInt32 as hexadecimal input like 0x1107 (meaning 1.1.07).
Example:
Input fwVersion = 1107,
Outputs string "1.1.07"
firmware version as hex
converted to "2.34" or "2.0C"
- Initial.
Building the FW Version string out of Int32 as decimal input.
Example:
Input fwVersion = 238,
Outputs string "2.38"
firmware version as hex
converted to "2.34" or "2.01"
- Initial.
Check region and size.
After reading the version, all valid registers are going to be selected.
- Initial, extracted from
- Frequency indicator == 0 means it is a NA-Region Octopus with EMEA FW installed.
- Pressure sensor detection.
Build a list of all registers based on the interface (configuration.json) and the installed
meter applications with a specific version.
- Initial, extracted from
- Excluded register versions explicit specified in the 'configuration.json' as version.exclude list.
- Excluded all registers from apps which are NOT installed (isInstalled == false).
...MF
Reading all applications which can be found in the configuration.json and have been stored
to the meter register dictionary in advance.
The read process covers the FW version and the CRC.
After reading the version, all valid registers are going to be selected.
- Removed "Cordonel " from CoreRevision to have the e.g. "1.64" remaining
- Read radio frequency
- Read lockup table CRC,
- Read meter size.
- Read lockup table CRC bugfix with try, catch for legacy versions, where this register does not exists.
- CoreRevision from String to Int32?,
- MeterSize from String to MeterSize,
- Region separated from RadioRegion as String,
- RadioFrequencyMhz introduced as Int32? (null if "NA" region or not installed),
- LutCrc from String to Int32?.
- Checked meter size string for "DN", then it cannot be an EMEA version.
- Removed retry as this will be handled by the .
- Remind installed FW version of FLEXNETVERSION for StoreAllConfigurations.
- Avoid multiple assignment of identical register in dictionary as the configuration.json may overlap
on some versions. If one register has been added, this passed the test and is valid for this FW.
It has to be avoided to have the register multiple times as it may cause unpredictable assignments
of values to one and reading and compare from another which doesn't have a value!
- Build dictionary for debug to observe if configuration.json contains overlapping versions.
- On missing answer mark as communication error being able to compare against not-installed. This issue
was responsible to start a FW update process in the CUST as it assumes the installation was incomplete,
but it couldn't detect those applications due to communication issues.
- BuildFlexnetFwVersion,
- Calculate core revision.
- Extract interface version (configuration.json) from "OPTICALINTERFACE".
- AppId from Byte to UInt16 including typecast for Byte on WriteRegister. To external, it will be used as Byte
as before this change. But being able to parse the configuration.json with OPTICALINTERFACE using the
AppId 256, which exceeds the byte range as this isn't a real application, but will be used to identify
the interface (configuration.json) version.
- Handle the interface compatibility FW version with short string like "1421" and discrete FW versions.
...MF
helper
...MF
Automatic login to meter enabled if logged out by lost authentication
If the timeout timer elapsed to keep the session active, this routine will be called
awaking the .
Thread to keep the connection to the meter open and the session alive,
because on missing communication the meter is going to logout automatically.
This thread will be started at and aborted on
Check if EMPTY_PIPE or REBOOT is set
Check if alarmToCheck is set on register
is Flags so you can use more than one alarms (like Alarm.EMPTY_PIPE | Alarm.REBOOT)
Read out all AlarmStatus register and combine them to one
Reset the empty pipe alarm
Reads the PCB Identification, can be accessed at all login levels,
Read Privilege is always needed to BUGFIX read access to PCB ID
PCB ID
- PcbId handling improved.
- PcbId handling improved,
- Removed retries as these are handled by the protocol.
Get the actual register dictionary
Serial number of meter married with PcbId
Event to Sync Register on MeterSide and
Fired on Write or read register
Register to update with value to update
Write Register, optional: wait for result and validate,
write register will ALWAYS log the data DON'T use for password write
Data type of Register
Register to change
Value to save
wait until result is ready
check the content of the register by read back
skip retries on this error code return
true on successful operation
- Changed sensitive information from "*****" to SHA256.
- PreRegisterWrite enabled to check register accessibility and range.
Read Register and return byte array
expected length for response
skip retries on this error code return
- Changed sensitive information from "*****" to SHA256.
- Date size directly from register object.
Execute request protocol and acts on response code.
- Removed throw because the throw always kicks in to
the FW-Update process causing an unpredictable stop!
- Remind last communication acknowledge code.
Send UI1236 command
- Initial
Clear Ports
Soft reset of meter runtime state.
Keeps ports, protocols, configuration, PCB and password intact.
Set the process state to display and to the production database
Check for min and max of register values to avoid out of range access
- Initial
- Reactivated to validate the register range.
Common routine for reboot being able to override this routine which will be called in
MeteResetPsu to simulate a reboot.
- Initial.
Executes all StoreConfiguration and StoreCalibration for each application.
true if all configurations are stored
- Initial
- Corrected logic to enter write and read loop,
- Removed SENSUSRADIO from read check as it returns NULL on read of StoreConfiguration.
- After write store configuration extended sleep.
- Removed comparison of allConfigRegisters less than 8 because the NA version has fewer registers and new
apps will have a new register.
- Removed temporary NA2ALARMS read back as this has no handler in the FW.
- Store first all configurations for every app in a bulk then read the status back.
- Installed FW version taken to enable read back for radio and na2walarms.
- Changed threshold check from decimal 1200 to hexadecimal 0x1200.
Cl
Upload app list to database
- Initial
- Using MetrologyUpgradePermission to flag if metrology is updateable as for "NA" versions this is the case.
- returns status.
Backup current register dictionary to database
Logging of register write processes to meter
ATTENTION: DON'T USE FOR PASSWORDS!
- Hide all file access commands and passwords.
Storage of calibration values
Dummy
- Initial.
Dummy
- Initial.
Copies safe runtime/configuration state from this GenesisMeter
to another GenesisMeter instance.
Intended usage:
GenesisMeter existingMeter
↓
ZeroFlowGenesisMeter newMeter
↓
existingMeter.CopySafeStateTo(newMeter)
Notes:
- does not copy ports
- does not copy protocols
- does not copy threads/timers
- does not copy events
- does not copy logger instances
- does not copy register containers
- target keeps its own construction/runtime infrastructure
Calibration factors for all channels
Registers needed to store the calibration for the individual channel
Just stop recording without calculation
List of ongoing measurements, base- and calibration-measurements
All channels required to process
Quality watch mode can be used to decode intermediate records and check
for actual quality of the measurements.
Perpetration of Measurement
SampleRate 10 and Led mode Test
Testing the flow direction
the first measurement is ALWAYS a FlowTestRecord due to the underlying routine logic.
The first measurement is ALWAYS a FlowTestRecord.
Calibration content
has been calibrated
Channel for calibration
Register to store the calibration
Ctor for calibration factor
set the user readable relative (around 1.0) calibration factor
and convert it to the raw calibration factor for the meter
Read the relative (around 1.0) calibration factor calculated from the actual
meter calibration factor divided by the default calibration factor
Genesis internal raw default value (around 15625)
Set the meter raw calibration factor (around 15625)
Get the meter raw calibration factor (around 15625)
Check the positioning of the streaming LED to validate the quality of the communication line
Backup of last quality
Quality check is active
Kick off the streaming quality check.
Stop the streaming check.
Number of records received (read line for LED message)
Total records decoded
Total errors
Validated without errors
Expected lines
Time
Error counter
The real result of quality check
The quality result as dummy zero
Port scanner:
using the Windows Device Manager listed ports,
tries to open the port with an exception if it cannot be accessed (very time-consuming),
tries to use the request protocol to detect a Genesis device.
Genesis for test access
Auto-detected port name
Port scan result event for message dispatcher to caller
Stop the port scan
Number of ports
Actual Port Counter
Returns the port scan state
- Initial
Ctor
true if one port has been validated
- Initial
type of communication port to meter like IrDA
- Initial.
- Remove all meters removed as _meterBatch.Dispose will remove all meters.
Use initially the port configuration to speed up search,
If configuration file contains wrong port setup than scan all serial ports listed in
the windows device manager,
Read available ports,
Try to open port and connect to Genesis meter.
slot to search for
configuration of port to speed up search
true if port found
true if one port has been validated
- Initial
- Port type from Ctor,
- Event message changed:
- Overall message: ctr / counts - ongoing scan,
- Actual message: Information to log
- Changed exit of function,
- Added configuration file handling.
- Remove all meters removed as _meterBatch.Dispose will remove all meters.
JSON filer reader for generation of register lists
Registers defined in configuration.json file
Applications defined in configuration.json file
Information collected during 'configuration.json' read
Ctor
Ctor
the file path for configuration.json as interface description to the meter
Convert file content to register list
- Initial.
- AppId from Byte to UInt16 including typecast for Byte[] return. To external, it will be used as Byte
as before this change. But being able to parse the configuration.json with OPTICALINTERFACE using the
AppId 256, which exceeds the byte range as this isn't a real application, but will be used to identify
the interface (configuration.json) version.
- Extract the max supported versions for EMEA and NA to check the supported FW.
- Supported application list introduced.
- Data size introduced including the new 'ByteArray' type and size to get rid of new defined 'uintxx_t'
data types.
Settings
Convert data types from interface 'configuration.json' to CLR type or array
type
- Initial.
- Parsed all 'uintxx_t' which are not based on CLR types to byte-array
Build the data size
size
- Initial: - parsed all 'uintxx_t' which are not based on CLR types to byte-array
A strongly-typed resource class, for looking up localized strings, etc.
Returns the cached ResourceManager instance used by this class.
Overrides the current thread's CurrentUICulture property for all
resource lookups using this strongly typed resource class.
Looks up a localized string similar to ERROR: Missing or invalid register definition (configuration.json)! Search in:.
Looks up a localized string similar to Cannot Open Comport. Check TaskManager for other Genesis relevant programs and close them! Also check if the comport is valid!.
Looks up a localized string similar to ERROR: Could not find a CSD parameter in register list!.
Looks up a localized string similar to ERROR: Could not find register in register list! Check configuration.json for latest version!.
Looks up a localized string similar to ERROR: Could not write register!.
Looks up a localized string similar to Read back.
Looks up a localized string similar to Access request..
Looks up a localized string similar to Failed to open..
Looks up a localized string similar to Ports listed in the Windows device manager..
Looks up a localized string similar to Automatic port scan started..
Looks up a localized string similar to Successfully accessed..
Looks up a localized string similar to Read register.
Looks up a localized string similar to Reading registers after maintenance.
Looks up a localized string similar to Reading registers before maintenance.
Looks up a localized string similar to Compare register.
Looks up a localized string similar to ERROR: Comparison failed!.
Looks up a localized string similar to Successfully compared..
Looks up a localized string similar to Execute configuration sequence.....
Looks up a localized string similar to Finalize configuration sequence.....
Looks up a localized string similar to Prepare configuration sequence.....
Looks up a localized string similar to ERROR: Register value is out of range!.
Looks up a localized string similar to Cordonel not detected!.
Looks up a localized string similar to Scan port.
Looks up a localized string similar to WARNING: Register value set to default.
Looks up a localized string similar to Write register.
Read, compare and restore if unequal al registers marked with
equals
".
The reader will use the byte values as they are unmodified and
will not be rounded and therefor possibly fail the comparison.
For logging the register value will be converted its unit.
PCB ID for pre update read for comparison
PCB ID for pre update write for comparison
PCB ID for post update for comparison
Collection of recovery registers - programming parameters
Marker for restore after reboot parameters
Register content on initial connect to keep those during update
Register content after all operation had been performed
Register which shall be restored after change of FW or after register recovery
Register access event for message dispatcher to caller
List for un-reversed parameters which can be written, all others need to be swapped byte-wise
Registers manually explicit excluded from comparison as those may change even if those have the
"StaticType": "static" in the configuration.json but will change for some reason.
Registers manually explicit marked to be restored after reboot if compare failed. Those registers will
temporary setup values which do not survive a reboot. This is done to overcome a FW-bug which overwrites
those values after the reboot procedure!
- Initial to restore values which do not survive the reboot as workaround for R1.4.22 and below.
Registers manually explicit excluded for in-field updatable parameters for the CUST to prevent inadvertent
modifications resulting in potential MID violations.
Defined by M.C., J.L. and A.F. with the file: 'FwUpdateController.cs-GetRecoveryFile()-2507160616.xlsx'.
CUST 2.8.14:
- Added: - ’SENSUSRADIO_WakeupInterval’ to keep radio active after CUST run
- Removed: - 'GENESISFLOW_SealDisplay' being able to modify display resolution
Registers manually explicit excluded from reading as those do not contain useful information.
Applies for RW commands not RPC data type.
Pre-programming parameters for all devices defined here, will be filled with radio parameters
if meter has radio
Registers which failed the comparison
Name of registers which should be restored after reboot if the compare failed.
Post programming parameters for all devices
Post programming parameters for EMEA region as NA region doesn't have radio and seal display shouldn't
be executed.
- Removed 'SENSUSRADIO_SystemState' as this will synchronize all parameters between this app and the
'PERIODICLOG' app. Meaning, the 'SENSUSRADIO' app will overwrite the previously adjusted parameters of
the 'PERIODICLOG'. After writing the last 'PERIODICLOG' parameter a delay timer between finish exec-
parametrization and store all configs needs at least 20 s to update contents.
Post programming parameters for EOL (end of line, prepare for shipping workplace)
Actual register counter
Genesis meter object
Struct to observe replacements
Ctor
Renew meter for Unit tests based on different meter
Assign new genesis after reboot and keep the RegisterRestorer object.
- Initial
Enable comparison from external set registers for read back with written value
- Initial
Export list of programming parameters to file being able to use it for test purposes.
- Initial.
Import list of programming parameters from file being able to use it for test purposes.
The input request the absolut path to the XX_YY_RawParameterExample.json and the filters for:
- Region,
- MeterSize,
- "RawParams" and
- ".json"
path where all raw parameter examples are stored
Region for configuration
Meter size for programming parameters
- Initial.
Process the raw programming parameters got from the database or meanwhile in raw-format stored to file
being able to fill the register restorer from external with values and test the byte-wise reverting
of the parameter (optional un-reverted if defined in the list ).
The priority of the parameters forced by its source is:
- CSD (highest),
- VAKO,
- Order based or standard config (lowest).
unprocessed data, not filtered by the priority and un-reversed
output as recovery registers reduced to the real needed ones and
processed as reverted or non-reverted values which directly can be written to the meter using the
meter specific "IGenesisMeter.WriteRegister"
error message for caller
field update forces to use the 'fieldUpdateBlacklist' to remove parameters
- Initial imported from .
- Return error message,
- Requirement to fulfill the at least one parameter has to be a CSD parameter as initially all programming
parameters are going to be preset with the default values (coming from the Web-API). After this they are
going to be overwritten with the VAKO (variant configuration) and finally again with the CSD of the
customer if required.
- Debug for overwriting VAKO with CSD including real values.
- Remove '_fieldUpdateBlacklist' parameters for the CUST to prevent inadvertent modifications resulting in potential
MID violations,
- Debug log of blacklist caused removals.
- Debug lists generation sequence changed.
Collect programming parameters from DB.
registers key value pair from database
error message from parameter analysis
field update forces to use the 'fieldUpdateBlacklist' to remove parameters
recovery registers
- Initial.
- Sort the registers from DB but keep the PrepareProgramming and FinalizeProgramming in the required sequence.
- Removed preparation and finalization of register recovery to remove sequencing as this will be done in the
RegisterRestorer by the FwUpdateSw worker giving the ability to log this in the report.
- Data base access imported to have a common interface for programming parameters for EOL (shipping) and CUST.
- Removed prohibited parameters.
- Added un-reversed parameters based on data type (string, uint128).
- Check and validate register values with installed or intended to be installed FW and given
configuration.json.
- Exported register range check to .
- Debug lists for CSD and VAKO parameters.
- Sorting, filtering for VAKO, CSD and order, reverting or un-reverting parameter value order exported
for the ability to load the raw programming parameters from any source and check the correct processing.
This will be especially used for unit-tests
- Error message.
- Remove '_fieldUpdateBlacklist' parameters for the CUST to prevent inadvertent modifications resulting in potential
MID violations.
EOL (end of line) programming contains a reset of the accumulators. Else it is identical with recover
registers.
list of registers to update from database without special sequence
true if setup succeeded
- Initial.
- CancellationToken.
Validate the range of the register.
register key value pair
register definition by configuration.json
error message if range check failed
check default value and supply warning
status
- Initial, imported from
- Leave the message generation to the
Recover all registers set from caller. Additional preparation and finalization will be added.
settings.
list of registers to update from database without special sequence
field update, if not set EOL (end of line) programming with accu reset
true if restoring succeeded
- Initial.
- Return true if already recovered,
- replace _restoreRegisters with new value.
- Added preparation and finalization of register recovery giving the ability to log this in the report.
- Moved register dictionary value set to inner try catch loop to avoid early exit if one register is
unknown.
- Logging of some exception messages.
- EOL sequence for accumulators reset,
- Remind pcbId as already recovered before the true return,
- Exclude lock of repeated execution for EOL.
- Avoid writing of parameters if not writable. The DB delivers parameters which exclusively have to be
compared to the specified value.
- Register list changed from RegisterDefinition to RecoveryRegisterItem list,
- Preset RecoveryRegisters if not set as those have to be compared later on.
- Add only registers to recovery list which are found in the generated register list based on installed
applications.
- Avoid writing of NOT writable registers.
- Check register limits, if those are out of range avoid writing and log warning message.
- Exported register range check to .
- Removed skip recovery if already done in previous run to enable a retry.
- Seal display and Sensus radio to EMEA finalization.
- Exported write routines to .
- CancellationToken.
- Remove '_fieldUpdateBlacklist' parameters for the CUST to prevent inadvertent modifications resulting in potential
MID violations.
- Login/Logout moved to .
Write a parameter set:
-
- Initial imported from .
- CancellationToken.
- Temporary excluded un-comparable registers from write as this make no sense to write them blind being
unable to read the correct value back.
- Remove '_fieldUpdateBlacklist' parameters for the CUST to prevent inadvertent modifications resulting in potential
MID violations.
- Excluded un-comparable registers from write turned back on ('blind' writing enabled again).
- Login/Logout moved here.
- Redundant OOR message removed.
Restore and compare all registers which did not survive a reboot and are listed in the
- This is a workaround for a FW-bug in R1.4.22 and below.
- Initial.
- Leave the initial 'RecoveryRegisters' intact.
- Leave the initial 'FailedComparisonRegisters' intact.
Compare all registers which can be restored without new access to meter.
true if equal
- Initial.
- Compare registers reactivated based on new interface (configuration.json) with new
"StaticType": “approximate”.
- Removed as those will change on e.g. FW update.
- Avoid message event if message is empty.
- Remind registers which failed the comparison including values.
- Register list changed from RegisterDefinition to RecoveryRegisterItem list.
- Removed all registers from comparison which are neither static nor approximate.
- Exception logging extended,
- Data size base on write data size as this may be shorter than the read data size which is always filled up
to a 4 byte chunk size.
- Add only registers to recovery list which are found in the generated register list based on installed applications.
- Used RecoveryRegisters WriteValue and ReadBackValue for comparison.
- Hash password and encryption key with SHA256.
- CancellationToken.
- Take 'null' in readBack into account due to communication error.
- _restoreAfterRebootIfCompareFailed.
- Made method static.
- Avoid clearing of failed registers
- Leave the initial 'RecoveryRegisters' intact.
Read the registers after the update for comparision. Build the post update registers here,
because an update may have changed the registers (new or removed registers).
true if registers could be read
- Initial.
- Build here the post update registers, they may have changed due to update!
- Clear pre update registers if post indicates a different PCB ID to avoid wrong overwriting of
registers to non-matching new meter.
- Return true if already executed in previous run.
- Return false if PcbId between initial- and final-read does NOT match return false.
- Allow final read out as often as called even if done before.
- Register list changed from RegisterDefinition to RecoveryRegisterItem list.
- Backup _finalRegisters to RecoveryRegisters.
- Check readBack value for null.
- CancellationToken.
- Cleared all failed compare registers and the restore after reboot registers as a new reading
will give it a new chance to compare it.
Get DEFINED registers from GenesisMeter class and read all registers which are flagged with
read write (RW) or read only (RO). Build a list of all registers being able to restore flagged
with equals ".
The defined registers are based on the "configuration.json" and the installed application with
a specific version.
true if registers could be read
- Initial.
- Stored registers before and after update.
- Extended register check.
- Removed after update registers and moved them to FinalReadRegisters. They may have changed
during the update.
- Deny register pre update if _pcbIdPreUpdate indicates, that this has been already processed.
- Removed login/logout,
- if _initialReadRegisters and _restoreRegisters are filled, return true.
- Register list changed from RegisterDefinition to RecoveryRegisterItem list.
- CancellationToken.
- CancellationToken.
- Repaired building of initial register list.
Get DEFINED registers from GenesisMeter class and build a list all registers which are flagged
with read write (RW) or read only (RO).
The defined registers are based on the "configuration.json" and the installed application with
a specific version.
all readable registers dictionary creation
true if register dictionary is not empty
true if registers could be read
- Initial from .
- Register list changed from RegisterDefinition to RecoveryRegisterItem list.
- Excluded registers which do not contain useful information.
- Sequence resorted.
Get DEFINED registers from GenesisMeter class and read all registers which are flagged with read write
(RW) or read only (RO).
The defined registers are based on the "configuration.json" and the installed application with a specific
version.
true if registers could be read
- Initial.
- Register list changed from RegisterDefinition to RecoveryRegisterItem list.
- CancellationToken.
Read predefined registers from RecoveryRegisters.
true if registers could be read
- Initial.
- CancellationToken.
- Leave the initial 'RecoveryRegisters' intact.
Register read loop.
All registers needed to be read from the Genesis meter as they are only prepared as template and NOT filled
with the register data!
The uses the overall process text and value for user information process
bar and text and the actual process text for logging to the report file!
Executes login, read cycle and logout.
registers to read
true if registers could be read
- Initial.
- Set value to actual process message.
- Added PCB ID to logging.
- Removed PCB ID from logging.
- Simplified input of set of registers to read.
- Set raw values in register dictionaries.
- Extended try catch to avoid break on one register failed.
- Filtered restore registers to access only if assigned,
- Logging of some exception messages.
- Register list changed from RegisterDefinition to RecoveryRegisterItem list.
- CancellationToken.
- Date size directly from register object.