Skip to content

Commit

Permalink
Add readme.md for modules
Browse files Browse the repository at this point in the history
  • Loading branch information
Frank.Markwort committed Sep 16, 2024
1 parent 3e1c466 commit 7246c49
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 7 deletions.
10 changes: 6 additions & 4 deletions src/Modules/Module/Realtime/Instruments/Bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,12 @@ public function update(InterfaceObservableRealtime $observable): void
$this->windSocketData(
$observable,
$observable->getFrame()->getHeader()->getPgn(),
$observable->getFrame()->getData()->getTimestamp() . ' '
. $observable->getFrame()->getData()->getDirection() . ' '
. $observable->getFrame()->getHeader()->getCanIdHex() . ' '
. $observable->getData()
sprintf('%s %s %s %s',
$observable->getFrame()->getData()->getTimestamp(),
$observable->getFrame()->getData()->getDirection(),
$observable->getFrame()->getHeader()->getCanIdHex(),
$observable->getData()
)
);
}

Expand Down
21 changes: 21 additions & 0 deletions src/Modules/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[External](External)

External classes can use Internal classes
[Internal](Internal)

Internal classes can use Core classes
[Module](Module)

Module classes can use External classes
[Cron](Module/Cron)
These modules are attached to [cron.php](../deamon/cron.php).

[Realtime](Module/Realtime)
These modules are attached to [RealtimeDistributor.php](Internal/RealtimeDistributor.php).

Modules are registered in [register.php](register.php)

Each module is attached via its own Bootstrap class, for example [Bootstrap.php](Module/Cron/AnchorWatch/Bootstrap.php),
which implements the interface [InterfaceObserverCronWorker.php](Internal/Interfaces/InterfaceObserverCronWorker.php) for [cron.php](../deamon/cron.php)
and [InterfaceObserverRealtime.php](Internal/Interfaces/InterfaceObserverRealtime.php)
for [RealtimeDistributor.php](Internal/RealtimeDistributor.php) ([deamon.php](../deamon/deamon.php)).
6 changes: 3 additions & 3 deletions src/deamon/socketServer.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
use Core\Config\Config;
use Core\Protocol\Socket\SocketsCollection;
use Core\Protocol\Socket\MessageHandler;
$socedCollection = new SocketsCollection();
$socetServer = new Server(Config::getSocketServerHost(), Config::getSocketServerPort(), $socedCollection, new MessageHandler($socedCollection));
$socetServer->run();
$socketCollection = new SocketsCollection();
$socketServer = new Server(Config::getSocketServerHost(), Config::getSocketServerPort(), $socketCollection, new MessageHandler($socketCollection));
$socketServer->run();

0 comments on commit 7246c49

Please sign in to comment.