uint16_t getDGain(int fd, uint8_t nodeId)
{
    ZO_PROTOCOL_PACKET p;
    p.addressedNodeID = nodeId;
    p.ownNodeID = 0x01;
    p.commandID = 0x66;
    p.byteCount = 0x00;
    p.lrc = 0x66;
    if( putPacketSerial(fd, &p) )
    {
        if( getResponse(fd, &p) )
            return strToU16(p.data);
        else
            return -1;
    }
    else
        return -1;
}
uint16_t getAnalogIn(int fd, uint8_t nodeId, uint8_t ain)
{
    ZO_PROTOCOL_PACKET p;
    p.addressedNodeID = nodeId;
    p.ownNodeID = 0x01;
    p.commandID = 0x6E;
    p.byteCount = 0x00;
    p.lrc = 0x6E;
    if( putPacketSerial(fd, &p) )
    {
        if( getResponse(fd, &p) )
            return strToU16(&(p.data[(ain*2)-2]));
        else
            return -1;
    }
    else
        return -1;
}
uint16_t zoSms::getAbsolutePosition(uint8_t nodeId)
{
	ZO_PROTOCOL_PACKET p;
	
	p.addressedNodeID = nodeId;
	p.ownNodeID = 1;
	p.commandID = 0x70;
	p.byteCount = 0;
	p.lrc = 0x70;
	
	if( ha.putPacket(&p) )
	{
		if( getResponse(&p) )
			return strToU16(p.data);
		else
			return -1;
	}
	else
		return -1;
}
uint16_t zoSms::getAnalogIn(uint8_t nodeId, uint8_t ain)
{
	ZO_PROTOCOL_PACKET p;
	
	p.addressedNodeID = nodeId;
	p.ownNodeID = 1;
	p.commandID = 0x6E;
	p.byteCount = 0;
	p.lrc = 0x6E;
	
	if( ha.putPacket(&p) )
	{
		if( getResponse(&p) )
			return strToU16(&(p.data[(ain*2)-2]));
		else
			return -1;
	}
	else
		return -1;
}