Complete rework of packet parsing and packet generation
This commit is contained in:
@@ -251,12 +251,15 @@ class System extends Model
|
||||
/**
|
||||
* Return the packet that this system uses
|
||||
*
|
||||
* @param Address $ao
|
||||
* @return Packet
|
||||
*/
|
||||
public function packet(): Packet
|
||||
public function packet(Address $ao): Packet
|
||||
{
|
||||
return new (collect(Packet::PACKET_TYPES)
|
||||
->get($this->pkt_type ?: config('fido.packet_default')));
|
||||
// @todo Check that the address is one of the system's addresses
|
||||
|
||||
return (new (collect(Packet::PACKET_TYPES)
|
||||
->get($this->pkt_type ?: config('fido.packet_default'))))->for($ao);
|
||||
}
|
||||
|
||||
public function poll(): ?Job
|
||||
|
Reference in New Issue
Block a user