OS/2, eCS & ArcaOS - Technical > Programming

[Classic REXX] Network Map

<< < (9/10) > >>

Remy:

--- Quote from: Jan-Erik Lärka on March 28, 2025, 08:52:27 pm ---Great update of the script Remy!  8)

It now tell me that the vacuum cleaner has gone offline for the night, but it managed to pull out the cable of the laptop today and ensured it went offline as well.


--- Quote from: Remy on March 28, 2025, 05:34:48 am ---I comment the 2 initial SET line into de macaddr.cmd and use those from config.sys
uncomment bof lines if you would like set these two vars without config.sys update
e.g.  remove /* and */ of both lines and set value to 1 or 0
/* 'SET WOL=1' */   
/* 'SET NET=1' */

--- End quote ---

Just type
SET WOL=1
SET NET=1
on the command line before you run the script and those will be added to each object it create, thus not require any of them in config.sys

or create a program object "Refresh" pointing to the script, without any parameter, but with
WOL=1
NET=1
in the Environment tab (See each created network object for examples).

How about merging/reuse code for the various calls that resemble each other, and control them with parameters?
Perhaps explore the use of parsing templates:
PARSE VALUE ... WITH pre (fixed_variable1) mid (fixed_variable2) post
The idea was initially to build a network map of the devices found on the home LAN with info about them.
What uses can we explore here?
Shares would be one thing, but ... are there something else that one want and can be created?!

--- End quote ---

Interesting project and seems to be enough like it is.
I found a good use :D
I have an audio streamer connected but not using it for a long time, it is no more usable through my control TAB and had to reboot the streamer
Now, I saw its status change and just refreshing it make the streamer wakeup...

Remy:
Corrected some code and added gateway, uc identifier
Added a refresh icon without arp flash.
(to have both refesh pgm icons created, change for only one run:
/* 'SET WOL=1' */  to  'SET WOL=1'
/* 'SET NET=1' */  to  'SET NET=1'
/* 'SET FLC=1' */  to  'SET FLC=1'

At end of run, set this line as it was originally.

Restriction: display network devices @mac under one sub-node only

For icons: https://www.os2world.com/forum/index.php/topic,3867.msg47719.html#msg47719

     

Remy:
I just had an idea !

Now, at first time run with FLC=1, a macaddr.cfg is created with a list of your home network devices in the form of  " @mac @ip hostname "
For UHost-xxx or names not well describing the device, you can change the hostname from into this cfg file
During the process, I only check for the corresponding @mac and not @ip and only those @mac having hostname changed, the change is taken and the icon will
display the user setted hostname but into the parameters, initial hostname is always left intact to allow correct process.

:D     
 
note, in my case, I replaced a host-002 sent by my Router/DNS to my Streamer real name.

Remy:
Hi Jan-Erik
Sorry having added a lof of codes  ::)

Jan-Erik Lärka:

--- Quote from: Remy on April 01, 2025, 01:20:57 am ---Hi Jan-Erik
Sorry having added a lof of codes  ::)

--- End quote ---

Ohh, yes, I soooOOooo crossed (NOT!) that you've improved the script further than one could hope for.

I''m actually very pleased that you've come up with all of these enhancements, but don't tell anyone I wrote that.  ;)

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version