public int EIB_Cache_Read_Sync_async( ushort dst , EIBAddr src , EIBBuffer buf , ushort age )
 {
     byte[] head = new byte[6]; byte[] ibuf = head; this.buf = buf; this.ptr5 = src; ibuf[2] = (byte)((dst>>8)&0xff); ibuf[2 +1] = (byte)((dst)&0xff); ibuf[4] = (byte)((age>>8)&0xff); ibuf[4 +1] = (byte)((age)&0xff); ibuf[0] = (byte)((0x0074>>8)&0xff); ibuf[1] = (byte)((0x0074)&0xff); if (_EIB_SendRequest (ibuf) == -1) return -1; complete = new complete_t (EIB_Cache_Read_Sync_complete); return 0;
 }
 private int EIB_Cache_LastUpdates_complete()
 {
     complete = null; int i; if (_EIB_GetRequest()== -1) return -1; if (((((((int)(data[0]))&0xff)<<8)|((((int)(data[1]))&0xff)))) != 0x0076 || data.Length < 2) { errno = ECONNRESET; return -1; } if (ptr4 != null) ptr4.data = (ushort)(((((int)(data[2]))&0xff)<<8)|((((int)(data[2 +1]))&0xff))); i = data.Length - 4; buf.data = new byte[i]; for (int j = 0; j < i; j++) buf.data[j] = data [j + 4]; return i;
 }
 private int EIB_Cache_Remove_complete()
 {
     complete = null; int i; if (_EIB_GetRequest()== -1) return -1; if (((((((int)(data[0]))&0xff)<<8)|((((int)(data[1]))&0xff)))) != 0x0073 || data.Length < 2) { errno = ECONNRESET; return -1; } return 0;
 }
 private int EIBGetTPDU_complete()
 {
     complete = null; int i; if (_EIB_GetRequest()== -1) return -1; if (((((((int)(data[0]))&0xff)<<8)|((((int)(data[1]))&0xff)))) != 0x0025 || data.Length < 4) { errno = ECONNRESET; return -1; } if (ptr5 != null) ptr5.addr = (ushort)(((((int)(data[2]))&0xff)<<8)|((((int)(data[2 +1]))&0xff))); i = data.Length - 4; buf.data = new byte[i]; for (int j = 0; j < i; j++) buf.data[j] = data [j + 4]; return i;
 }
 private int EIBOpenVBusmonitor_complete()
 {
     complete = null; int i; if (_EIB_GetRequest()== -1) return -1; if (((((((int)(data[0]))&0xff)<<8)|((((int)(data[1]))&0xff)))) == 0x0001) { errno = EBUSY; return -1; } if (((((((int)(data[0]))&0xff)<<8)|((((int)(data[1]))&0xff)))) != 0x0012 || data.Length < 2) { errno = ECONNRESET; return -1; } return 0;
 }
 public int EIB_M_ReadIndividualAddresses_async( EIBBuffer buf )
 {
     byte[] head = new byte[2]; byte[] ibuf = head; this.buf = buf; ibuf[0] = (byte)((0x0032>>8)&0xff); ibuf[1] = (byte)((0x0032)&0xff); if (_EIB_SendRequest (ibuf) == -1) return -1; complete = new complete_t (EIB_M_ReadIndividualAddresses_complete); return 0;
 }
 private int EIBGetBusmonitorPacketTS_complete()
 {
     complete = null; int i; if (_EIB_GetRequest()== -1) return -1; if (((((((int)(data[0]))&0xff)<<8)|((((int)(data[1]))&0xff)))) != 0x0015 || data.Length < 7) { errno = ECONNRESET; return -1; } if (ptr2 != null) ptr2.data = data[2]; if (ptr7 != null) ptr7.addr = (uint)(((((int)(data[3]))&0xff)<<24)|((((int)(data[3 +1]))&0xff)<<16)|((((int)(data[3 +2]))&0xff)<<8)|((((int)(data[3 +3]))&0xff))); i = data.Length - 7; buf.data = new byte[i]; for (int j = 0; j < i; j++) buf.data[j] = data [j + 7]; return i;
 }
 public int EIB_MC_PropertyDesc_async( byte obj , byte propertyno , UInt8 proptype , UInt16 max_nr_of_elem , UInt8 access )
 {
     byte[] head = new byte[4]; byte[] ibuf = head; this.ptr2 = proptype; this.ptr4 = max_nr_of_elem; this.ptr3 = access; ibuf[2] = (byte)((obj)&0xff); ibuf[3] = (byte)((propertyno)&0xff); ibuf[0] = (byte)((0x0061>>8)&0xff); ibuf[1] = (byte)((0x0061)&0xff); if (_EIB_SendRequest (ibuf) == -1) return -1; complete = new complete_t (EIB_MC_PropertyDesc_complete); return 0;
 }
 public int EIB_MC_PropertyRead_async( byte obj , byte propertyno , ushort start , byte nr_of_elem , EIBBuffer buf )
 {
     byte[] head = new byte[7]; byte[] ibuf = head; this.buf = buf; ibuf[2] = (byte)((obj)&0xff); ibuf[3] = (byte)((propertyno)&0xff); ibuf[4] = (byte)((start>>8)&0xff); ibuf[4 +1] = (byte)((start)&0xff); ibuf[6] = (byte)((nr_of_elem)&0xff); ibuf[0] = (byte)((0x0053>>8)&0xff); ibuf[1] = (byte)((0x0053)&0xff); if (_EIB_SendRequest (ibuf) == -1) return -1; complete = new complete_t (EIB_MC_PropertyRead_complete); return 0;
 }
 public int EIB_MC_GetMaskVersion_async( )
 {
     byte[] head = new byte[2]; byte[] ibuf = head; ibuf[0] = (byte)((0x0059>>8)&0xff); ibuf[1] = (byte)((0x0059)&0xff); if (_EIB_SendRequest (ibuf) == -1) return -1; complete = new complete_t (EIB_MC_GetMaskVersion_complete); return 0;
 }
 public int EIB_MC_Progmode_Toggle_async( )
 {
     byte[] head = new byte[3]; byte[] ibuf = head; ibuf[2] = (byte)((2)&0xff); ibuf[0] = (byte)((0x0060>>8)&0xff); ibuf[1] = (byte)((0x0060)&0xff); if (_EIB_SendRequest (ibuf) == -1) return -1; complete = new complete_t (EIB_MC_Progmode_Toggle_complete); return 0;
 }
 public int EIB_MC_Connect_async( ushort dest )
 {
     byte[] head = new byte[4]; byte[] ibuf = head; ibuf[2] = (byte)((dest>>8)&0xff); ibuf[2 +1] = (byte)((dest)&0xff); ibuf[0] = (byte)((0x0050>>8)&0xff); ibuf[1] = (byte)((0x0050)&0xff); if (_EIB_SendRequest (ibuf) == -1) return -1; complete = new complete_t (EIB_MC_Connect_complete); return 0;
 }
 public int EIB_LoadImage_async( byte[] image )
 {
     byte[] head = new byte[2]; byte[] ibuf = head; if (image.Length < 0) throw new IndexOutOfRangeException ("data to short"); ibuf = new byte[head.Length + image.Length]; sendlen = image.Length; for (int i = 0; i < head.Length; i++) ibuf [i] = head[i]; for (int i = 0; i < image.Length; i++) ibuf [i + head.Length] = image[i]; ibuf[0] = (byte)((0x0063>>8)&0xff); ibuf[1] = (byte)((0x0063)&0xff); if (_EIB_SendRequest (ibuf) == -1) return -1; complete = new complete_t (EIB_LoadImage_complete); return 0;
 }
 public int EIB_Cache_Remove_async( ushort dest )
 {
     byte[] head = new byte[4]; byte[] ibuf = head; ibuf[2] = (byte)((dest>>8)&0xff); ibuf[2 +1] = (byte)((dest)&0xff); ibuf[0] = (byte)((0x0073>>8)&0xff); ibuf[1] = (byte)((0x0073)&0xff); if (_EIB_SendRequest (ibuf) == -1) return -1; complete = new complete_t (EIB_Cache_Remove_complete); return 0;
 }
 public int EIB_M_GetMaskVersion_async( ushort dest )
 {
     byte[] head = new byte[4]; byte[] ibuf = head; ibuf[2] = (byte)((dest>>8)&0xff); ibuf[2 +1] = (byte)((dest)&0xff); ibuf[0] = (byte)((0x0031>>8)&0xff); ibuf[1] = (byte)((0x0031)&0xff); if (_EIB_SendRequest (ibuf) == -1) return -1; complete = new complete_t (EIB_M_GetMaskVersion_complete); return 0;
 }
 public int EIB_MC_PropertyScan_async( EIBBuffer buf )
 {
     byte[] head = new byte[2]; byte[] ibuf = head; this.buf = buf; ibuf[0] = (byte)((0x0062>>8)&0xff); ibuf[1] = (byte)((0x0062)&0xff); if (_EIB_SendRequest (ibuf) == -1) return -1; complete = new complete_t (EIB_MC_PropertyScan_complete); return 0;
 }
 public int EIB_M_Progmode_Toggle_async( ushort dest )
 {
     byte[] head = new byte[5]; byte[] ibuf = head; ibuf[2] = (byte)((dest>>8)&0xff); ibuf[2 +1] = (byte)((dest)&0xff); ibuf[4] = (byte)((2)&0xff); ibuf[0] = (byte)((0x0030>>8)&0xff); ibuf[1] = (byte)((0x0030)&0xff); if (_EIB_SendRequest (ibuf) == -1) return -1; complete = new complete_t (EIB_M_Progmode_Toggle_complete); return 0;
 }
 public int EIB_MC_PropertyWrite_async( byte obj , byte propertyno , ushort start , byte nr_of_elem , byte[] buf , EIBBuffer res )
 {
     byte[] head = new byte[7]; byte[] ibuf = head; ibuf[2] = (byte)((obj)&0xff); ibuf[3] = (byte)((propertyno)&0xff); ibuf[4] = (byte)((start>>8)&0xff); ibuf[4 +1] = (byte)((start)&0xff); ibuf[6] = (byte)((nr_of_elem)&0xff); if (buf.Length < 0) throw new IndexOutOfRangeException ("data to short"); ibuf = new byte[head.Length + buf.Length]; sendlen = buf.Length; for (int i = 0; i < head.Length; i++) ibuf [i] = head[i]; for (int i = 0; i < buf.Length; i++) ibuf [i + head.Length] = buf[i]; this.buf = res; ibuf[0] = (byte)((0x0054>>8)&0xff); ibuf[1] = (byte)((0x0054)&0xff); if (_EIB_SendRequest (ibuf) == -1) return -1; complete = new complete_t (EIB_MC_PropertyWrite_complete); return 0;
 }
 public int EIB_M_WriteIndividualAddress_async( ushort dest )
 {
     byte[] head = new byte[4]; byte[] ibuf = head; ibuf[2] = (byte)((dest>>8)&0xff); ibuf[2 +1] = (byte)((dest)&0xff); ibuf[0] = (byte)((0x0040>>8)&0xff); ibuf[1] = (byte)((0x0040)&0xff); if (_EIB_SendRequest (ibuf) == -1) return -1; complete = new complete_t (EIB_M_WriteIndividualAddress_complete); return 0;
 }
 public int EIB_MC_ReadADC_async( byte channel , byte count , Int16 val )
 {
     byte[] head = new byte[4]; byte[] ibuf = head; this.ptr1 = val; ibuf[2] = (byte)((channel)&0xff); ibuf[3] = (byte)((count)&0xff); ibuf[0] = (byte)((0x0056>>8)&0xff); ibuf[1] = (byte)((0x0056)&0xff); if (_EIB_SendRequest (ibuf) == -1) return -1; complete = new complete_t (EIB_MC_ReadADC_complete); return 0;
 }
 private int EIBGetBusmonitorPacket_complete()
 {
     complete = null; int i; if (_EIB_GetRequest()== -1) return -1; if (((((((int)(data[0]))&0xff)<<8)|((((int)(data[1]))&0xff)))) != 0x0014 || data.Length < 2) { errno = ECONNRESET; return -1; } i = data.Length - 2; buf.data = new byte[i]; for (int j = 0; j < i; j++) buf.data[j] = data [j + 2]; return i;
 }
 public int EIB_MC_Read_async( ushort addr , int buf_len, EIBBuffer buf )
 {
     byte[] head = new byte[6]; byte[] ibuf = head; this.buf = buf; ibuf[2] = (byte)((addr>>8)&0xff); ibuf[2 +1] = (byte)((addr)&0xff); ibuf[4] = (byte)(((buf_len)>>8)&0xff); ibuf[4 +1] = (byte)(((buf_len))&0xff); ibuf[0] = (byte)((0x0051>>8)&0xff); ibuf[1] = (byte)((0x0051)&0xff); if (_EIB_SendRequest (ibuf) == -1) return -1; complete = new complete_t (EIB_MC_Read_complete); return 0;
 }
 private int EIBOpenVBusmonitorTS_complete()
 {
     complete = null; int i; if (_EIB_GetRequest()== -1) return -1; if (((((((int)(data[0]))&0xff)<<8)|((((int)(data[1]))&0xff)))) == 0x0001) { errno = EBUSY; return -1; } if (((((((int)(data[0]))&0xff)<<8)|((((int)(data[1]))&0xff)))) != 0x0017 || data.Length < 6) { errno = ECONNRESET; return -1; } if (ptr7 != null) ptr7.addr = (uint)(((((int)(data[2]))&0xff)<<24)|((((int)(data[2 +1]))&0xff)<<16)|((((int)(data[2 +2]))&0xff)<<8)|((((int)(data[2 +3]))&0xff))); return 0;
 }
 public int EIB_MC_Restart_async( )
 {
     byte[] head = new byte[2]; byte[] ibuf = head; ibuf[0] = (byte)((0x005a>>8)&0xff); ibuf[1] = (byte)((0x005a)&0xff); if (_EIB_SendRequest (ibuf) == -1) return -1; complete = new complete_t (EIB_MC_Restart_complete); return 0;
 }
 private int EIBOpen_GroupSocket_complete()
 {
     complete = null; int i; if (_EIB_GetRequest()== -1) return -1; if (((((((int)(data[0]))&0xff)<<8)|((((int)(data[1]))&0xff)))) != 0x0026 || data.Length < 2) { errno = ECONNRESET; return -1; } return 0;
 }
 public int EIB_MC_SetKey_async( byte[] key , byte level )
 {
     byte[] head = new byte[7]; byte[] ibuf = head; if (key.Length != 4) throw new IndexOutOfRangeException ("key is not 4 bytes long"); for (int i = 0; i < 4; i++) ibuf[2 + i] = key[i]; ibuf[6] = (byte)((level)&0xff); ibuf[0] = (byte)((0x0058>>8)&0xff); ibuf[1] = (byte)((0x0058)&0xff); if (_EIB_SendRequest (ibuf) == -1) return -1; complete = new complete_t (EIB_MC_SetKey_complete); return 0;
 }
 private int EIB_Cache_Read_Sync_complete()
 {
     complete = null; int i; if (_EIB_GetRequest()== -1) return -1; if (((((((int)(data[0]))&0xff)<<8)|((((int)(data[1]))&0xff)))) != 0x0074 || data.Length < 2) { errno = ECONNRESET; return -1; } if ((((((int)(data[4]))&0xff)<<8)|((((int)(data[4 +1]))&0xff))) == 0) { errno = ENODEV; return -1; } if (data.Length <= 6) { errno = ENOENT; return -1; } if (ptr5 != null) ptr5.addr = (ushort)(((((int)(data[2]))&0xff)<<8)|((((int)(data[2 +1]))&0xff))); i = data.Length - 6; buf.data = new byte[i]; for (int j = 0; j < i; j++) buf.data[j] = data [j + 6]; return i;
 }
 public int EIB_MC_Write_Plain_async( ushort addr , byte[] buf )
 {
     byte[] head = new byte[6]; byte[] ibuf = head; ibuf[2] = (byte)((addr>>8)&0xff); ibuf[2 +1] = (byte)((addr)&0xff); ibuf[4] = (byte)(((buf.Length)>>8)&0xff); ibuf[4 +1] = (byte)(((buf.Length))&0xff); if (buf.Length < 0) throw new IndexOutOfRangeException ("data to short"); ibuf = new byte[head.Length + buf.Length]; sendlen = buf.Length; for (int i = 0; i < head.Length; i++) ibuf [i] = head[i]; for (int i = 0; i < buf.Length; i++) ibuf [i + head.Length] = buf[i]; ibuf[0] = (byte)((0x005b>>8)&0xff); ibuf[1] = (byte)((0x005b)&0xff); if (_EIB_SendRequest (ibuf) == -1) return -1; complete = new complete_t (EIB_MC_Write_Plain_complete); return 0;
 }
 private int EIB_LoadImage_complete()
 {
     complete = null; int i; if (_EIB_GetRequest()== -1) return -1; if (((((((int)(data[0]))&0xff)<<8)|((((int)(data[1]))&0xff)))) != 0x0063 || data.Length < 4) { errno = ECONNRESET; return -1; } return (((((int)(data[2]))&0xff)<<8)|((((int)(data[2 +1]))&0xff)));
 }
 public int EIB_Cache_LastUpdates_async( ushort start , byte timeout , EIBBuffer buf , UInt16 ende )
 {
     byte[] head = new byte[5]; byte[] ibuf = head; this.buf = buf; this.ptr4 = ende; ibuf[2] = (byte)((start>>8)&0xff); ibuf[2 +1] = (byte)((start)&0xff); ibuf[4] = (byte)((timeout)&0xff); ibuf[0] = (byte)((0x0076>>8)&0xff); ibuf[1] = (byte)((0x0076)&0xff); if (_EIB_SendRequest (ibuf) == -1) return -1; complete = new complete_t (EIB_Cache_LastUpdates_complete); return 0;
 }