Add Zmodem/BINKP/EMSI
This commit is contained in:
@@ -2,11 +2,15 @@
|
||||
|
||||
namespace App\Classes;
|
||||
|
||||
use App\Exceptions\InvalidFidoPacketException;
|
||||
use Carbon\Carbon;
|
||||
|
||||
use App\Exceptions\InvalidFidoPacketException;
|
||||
use App\Traits\GetNode;
|
||||
|
||||
class FTNPacket extends FTN
|
||||
{
|
||||
use GetNode;
|
||||
|
||||
public $pktsrc = NULL;
|
||||
public $pktdst = NULL;
|
||||
private $pktver = NULL;
|
||||
@@ -92,12 +96,18 @@ class FTNPacket extends FTN
|
||||
}
|
||||
}
|
||||
|
||||
// @note - messages in this object have the same next destination
|
||||
public function __toString(): string
|
||||
{
|
||||
// @todo - is this appropriate to set here
|
||||
$this->date = now();
|
||||
$this->pktsrc = '10:1/5.0';
|
||||
$this->pktdst = '10:1/0.0';
|
||||
$this->pktsrc = (string)$this->get_node(ftn_address_split('10:1/5.0'),TRUE);
|
||||
|
||||
// @todo
|
||||
if ($this->messages->first()->type == 'echomail')
|
||||
$this->pktdst = (string)$this->messages->first()->fqfa->uplink;
|
||||
else
|
||||
$this->pktdst = (string)$this->messages->first()->fqda->uplink;
|
||||
|
||||
$this->software['prodcode-lo'] = 0x00;
|
||||
$this->software['prodcode-hi'] = 0xde;
|
||||
@@ -165,6 +175,7 @@ class FTNPacket extends FTN
|
||||
|
||||
public function addMessage(FTNMessage $o)
|
||||
{
|
||||
// @todo Check that this message is for the same uplink.
|
||||
$this->messages->push($o);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user