It would be better to make it like perl and return a string, 
["data_php"]=> the same as ["data"]=>

"0,1,0,0,0,0,0,0" False doesn't make sense here.


On 05/17/2011 05:52 AM, Roberto Spadim wrote:
> hum, i must re-read php.ownet code and check if exist some problem
> with array convertion, in this case ownet will convert all i/o as a
> array
> in this case:
>
>> array(9) { [0]=>  int(0) [1]=>  int(15) [2]=>  int(15) [3]=>  int(258) [4]=>
>> int(15) [5]=>  int(0) ["data"]=>  string(15) "0,1,0,0,0,0,0,0"
>> ["data_len"]=>  int(15) ["data_php"]=>  bool(false) }
> should return: array(
> 0=>0,
> 1=>1,
> 2=>0,
> 3=>0,
> 4=>0,
> 5=>0,
> 6=>0,
> 7=>0,
> 'data_len'=>15,
> 'data_php'=>false or an array must check this part of code...,
> 'data'=>  "0,1,0,0,0,0,0,0"
> )
>
>
> 2011/5/17 William Brown<[email protected]>:
>> Found these situations with the DS2408. and DS2450
>> 1 - get/read PIO.ALL gives a false if pio.0 is off, Only if pio.0 on
>> gives true.
>> 2 - The result returned is not the actual PIO,ALL string but an array
>> with the string, Is this the correct behavior?
>> 3 - When get is True returns a 1 but false returns nothing.
>> 4 - What is the purpose of the options true/false in the get command?
>>
>> var_dump($ow->get("/29.9D6D04000000/PIO.ALL",OWNET_MSG_READ,true)
>> array(9) { [0]=>  int(0) [1]=>  int(15) [2]=>  int(15) [3]=>  int(258) [4]=>
>> int(15) [5]=>  int(0) ["data"]=>  string(15) "0,1,0,0,0,0,0,0"
>> ["data_len"]=>  int(15) ["data_php"]=>  bool(false) }
>>
>> $pio = $ow->get("/29.9D6D04000000/PIO.ALL",OWNET_MSG_READ,true)
>> echo $pio>Array
>> echo $pio[data]>0,1,0,0,0,0,0,0
>>
>> var_dump($ow->get("/29.9D6D04000000/PIO.ALL",OWNET_MSG_READ,false)
>> bool(false)
>>
>> $pio = $ow->get("/29.9D6D04000000/PIO.ALL",OWNET_MSG_READ,false)
>> echo $pio>
>> var dump $pio>bool(false)
>>
>> var_dump($ow->read("/29.9D6D04000000/PIO.ALL")
>> bool(false)
>>
>> $pio = $ow->read("/29.9D6D04000000/PIO.ALL")
>> echo $pio>
>> var dump $pio>bool(false)
>>
>>
>> ------------------------------------------------------------------------------
>> Achieve unprecedented app performance and reliability
>> What every C/C++ and Fortran developer should know.
>> Learn how Intel has extended the reach of its next-generation tools
>> to help boost performance applications - inlcuding clusters.
>> http://p.sf.net/sfu/intel-dev2devmay
>> _______________________________________________
>> Owfs-developers mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/owfs-developers
>>
>>
>
>


------------------------------------------------------------------------------
Simplify data backup and recovery for your virtual environment with vRanger.
Installation's a snap, and flexible recovery options mean your data is safe,
secure and there when you need it. Data protection magic?
Nope - It's vRanger. Get your free trial download today.
http://p.sf.net/sfu/quest-sfdev2dev
_______________________________________________
Owfs-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/owfs-developers

Reply via email to