def set_sensor_ip(self,ip): """ Set the card IP address @param ip: IP address of this sensor """ logger.debug("Setting sensor IP to %s."%ip) ip = struct.pack('>I',NET.ip2int(ip)) lophi_packet = self._send_command(G.SENSOR_DISK.OP.REG_WRITE, G.SENSOR_DISK.ADDR.IP_SENS, ip) if lophi_packet.header['op_code'] == G.SENSOR_DISK.OP.REG_WRITE and lophi_packet.header['memory_addr'] == G.SENSOR_DISK.ADDR.IP_SENS: return True else: return False
def set_dest_ip(self,dest_ip): """ Set the destination IP for our SATA frames @param dest_ip: Destination IP that SATA packets will be sent to """ logger.debug("Setting destination IP to %s."%dest_ip) ip = struct.pack('>I',NET.ip2int(dest_ip)) lophi_packet = self._send_command(G.SENSOR_DISK.OP.REG_WRITE, G.SENSOR_DISK.ADDR.IP_DEST, ip) if lophi_packet.header['op_code'] == G.SENSOR_DISK.OP.REG_WRITE and lophi_packet.header['memory_addr'] == G.SENSOR_DISK.ADDR.IP_DEST: return True else: return False
def set_sensor_ip(self, ip): """ Set the card IP address @param ip: IP address of this sensor """ logger.debug("Setting sensor IP to %s." % ip) ip = struct.pack('>I', NET.ip2int(ip)) lophi_packet = self._send_command(G.SENSOR_DISK.OP.REG_WRITE, G.SENSOR_DISK.ADDR.IP_SENS, ip) if lophi_packet.header[ 'op_code'] == G.SENSOR_DISK.OP.REG_WRITE and lophi_packet.header[ 'memory_addr'] == G.SENSOR_DISK.ADDR.IP_SENS: return True else: return False
def set_dest_ip(self, dest_ip): """ Set the destination IP for our SATA frames @param dest_ip: Destination IP that SATA packets will be sent to """ logger.debug("Setting destination IP to %s." % dest_ip) ip = struct.pack('>I', NET.ip2int(dest_ip)) lophi_packet = self._send_command(G.SENSOR_DISK.OP.REG_WRITE, G.SENSOR_DISK.ADDR.IP_DEST, ip) if lophi_packet.header[ 'op_code'] == G.SENSOR_DISK.OP.REG_WRITE and lophi_packet.header[ 'memory_addr'] == G.SENSOR_DISK.ADDR.IP_DEST: return True else: return False