Add support for Cli_ReadMultiVars

This change add supports for the Cli_ReadMultiVars function.  I have also included an example.

ok don't worry about it, i'm already happy people putting effort in making
python-snap7 better.

I propose I merge this for now, and whenever you have the time to make it
more pythonic please do so. If i find some spare time somewhere I'll have a
look.

thanks!

2014-10-11 21:41 GMT+02:00 lance5107B <notifications@github.com>:

> In example/read_multi.py:
>
> > +data_items[0].Start = ctypes.c_int32(16)
> > +data_items[0].Amount = ctypes.c_int32(4)  # reading a REAL, 4 bytes
> > +
> > +data_items[1].Area = ctypes.c_int32(S7AreaDB)
> > +data_items[1].WordLen = ctypes.c_int32(S7WLByte)
> > +data_items[1].Result = ctypes.c_int32(0)
> > +data_items[1].DBNumber = ctypes.c_int32(200)
> > +data_items[1].Start = ctypes.c_int32(12)
> > +data_items[1].Amount = ctypes.c_int32(4)  # reading a REAL, 4 bytes
> > +
> > +data_items[2].Area = ctypes.c_int32(S7AreaDB)
> > +data_items[2].WordLen = ctypes.c_int32(S7WLByte)
> > +data_items[2].Result = ctypes.c_int32(0)
> > +data_items[2].DBNumber = ctypes.c_int32(200)
> > +data_items[2].Start = ctypes.c_int32(2)
> > +data_items[2].Amount = ctypes.c_int32(2)  # reading an INT, 2 bytes
>
> This is my inexperience showing, I did not know you could do that. I have
> not done much work in python before and this is the first time I have tried
> to work with a C library from python. I will try to find some time to
> experiment with the method you mentioned.
>
> While my implementation of Cli_ReadMultiVars works, I think it could be
> made much easier to use.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/gijzelaerr/python-snap7/pull/28/files#r18743914>.
>



-- 
Gijs Molenaar
http://pythonic.nl <http://gijs.pythonic.nl>