Rework address roles, making Address::role optional, rework determining uplink/downlinks/parent/children

This commit is contained in:
2024-05-09 21:22:30 +10:00
parent 2765a27db8
commit 23159d19d5
23 changed files with 667 additions and 421 deletions

View File

@@ -420,7 +420,7 @@ class Packet extends FTNBase implements \Iterator, \Countable
'host_id' => $msg->tn,
'node_id' => $msg->tf,
'point_id' => $msg->tp,
'active' => TRUE,
'active' => TRUE, // @todo This should be false, as it hasnt been assigned to the node
]);
Address::reguard();
@@ -433,8 +433,6 @@ class Packet extends FTNBase implements \Iterator, \Countable
return;
}
$ao->role = Address::NODE_UNKNOWN;
$so = System::createUnknownSystem();
$so->addresses()->save($ao);
@@ -453,7 +451,7 @@ class Packet extends FTNBase implements \Iterator, \Countable
'host_id' => $msg->fn,
'node_id' => $msg->ff,
'point_id' => $msg->fp,
'active'=> TRUE,
'active'=> TRUE, // @todo This should be FALSE as it hasnt been assigned to the node
]);
Address::reguard();
@@ -466,8 +464,6 @@ class Packet extends FTNBase implements \Iterator, \Countable
return;
}
$ao->role = Address::NODE_UNKNOWN;
$so = System::createUnknownSystem();
$so->addresses()->save($ao);