

This library to be used in a variety of ways not only with dictionaries of property names and values but with dynamics as well. Why use an IDictionary? Because a C# dynamic ( well really an ExpandoObject ) can easily be cast to one allowing Populating an entire object graph by using underscore notation to underscore into nested objects. It primarily converts C# dynamics and IDictionary to strongly typed objects and supports Static types and populate complex nested child objects.

Slapper.AutoMapper ( Pronounced Slapper-Dot-Automapper ) is a mapping library that can convert dynamic data into

Slapper.AutoMapper maps dynamic data to static types. decode_32bit_float () def parse_64bit_float ( tokens ): return lambda d : d. decode_64bit_int () def parse_32bit_float ( tokens ): return lambda d : d. decode_32bit_int () def parse_64bit_int ( tokens ): return lambda d : d. decode_16bit_int () def parse_32bit_int ( tokens ): return lambda d : d. decode_8bit_int () def parse_16bit_int ( tokens ): return lambda d : d. decode_64bit_uint () def parse_8bit_int ( tokens ): return lambda d : d. decode_32bit_uint () def parse_64bit_uint ( tokens ): return lambda d : d. decode_16bit_uint () def parse_32bit_uint ( tokens ): return lambda d : d. decode_8bit_uint () def parse_16bit_uint ( tokens ): return lambda d : d.

decode_bits () def parse_8bit_uint ( tokens ): return lambda d : d. decode_string ( size = size ) def parse_bits ( tokens ): return lambda d : d. Currently supported formats are: * csv * json * xml Here is an example of generating and using a mapping decoder (note that this is still in the works and will be greatly simplified in the final api it is just an example of the requested functionality):: from modbus_mapper import csv_mapping_parser from modbus_mapper import mapping_decoder from import ModbusTcpClient from pymodbus.payload import BinaryModbusDecoder template = raw_mapping = csv_mapping_parser('input.csv', template) mapping = mapping_decoder(raw_mapping) index, size = 1, 100 client = ModbusTcpClient('localhost') response = client.read_holding_registers(index, size) decoder = omRegisters(response.registers) while index < size: print "[ # - # Type parsers # - # def parse_string ( tokens ): _ = tokens. """ Given a modbus mapping file, this is used to generate decoder blocks so that non-programmers can define the register values and then decode a modbus device all without having to write a line of code for decoding. Asynchronous Asyncio Serial Client Example.
