public function testCidr()
 {
     $ipSeg1 = new ipSegment(0, 0);
     $ipSeg1->setCidr("1.0.0.0/14");
     $this->assertEquals("1.0.0.0", $ipSeg1->getStartIpString());
     $this->assertEquals("1.3.255.255", $ipSeg1->getEndIpString());
 }
 private function getNextCellular()
 {
     while ($connRow = $this->connCsvParser->getNext(1)) {
         if ($connRow[0]['connection_type'] === 'Cellular') {
             if (!isset($connRow[0]['network']) && !isset($connRow[0]['network_start_ip'], $connRow[0]['network_last_ip'])) {
                 throw new Exception("ERROR: Не найдено поле network");
             }
             if (isset($connRow[0]['network_start_ip'])) {
                 $cellSeg = new ipSegment($connRow[0]['network_start_ip'], $connRow[0]['network_last_ip']);
             } else {
                 $cellSeg = new ipSegment(0, 0);
                 $cellSeg->setCidr($connRow[0]['network']);
             }
             return $cellSeg;
         }
     }
     return false;
 }