Elvas Tower: Proposal to introduce user-defined signal function types - Elvas Tower

Jump to content

Posting Rules

All new threads will be started by members of the Open Rails team, Staff, and/or Admins. Existing threads started in other forums may get moved here when it makes sense to do so.

Once a thread is started any member may post replies to it.
  • 2 Pages +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

Proposal to introduce user-defined signal function types Rate Topic: -----

#1 User is offline   roeter 

  • Vice President
  • Group: Status: Elite Member
  • Posts: 2,424
  • Joined: 25-October 11
  • Gender:Male
  • Country:

Posted 07 March 2017 - 03:23 AM

The blueprint linked below describes the proposal to introduce user-defined signal function types :
Signal function types

The introduction of signal variables extends the use of signals in such a way that in many situations it may be much more usefull to use signals for a specific action or definition.
For instance, to set a signal to a specific aspect on approaching a junction is now often done using the signal 'link'.
But only one link is possible, and therefor only one additional aspect can be defined.
Using 'route' signals (dummy signals on the various routes defining route specific details) allows much more variation, e.g. different aspects, information on speed, 'calling on' settings etc. There are already a number of signal definitions using such 'route' signals, but the present restricted number of possible signal function types limits the use of such additional signals.
This proposal lifts that restriction and will allow a much more varies use of signals.

Regards,
Rob Roeterdink

#2 User is offline   James Ross 

  • Open Rails Developer
  • Group: Status: Elite Member
  • Posts: 5,490
  • Joined: 30-June 10
  • Gender:Not Telling
  • Simulator:Open Rails
  • Country:

Posted 19 March 2017 - 07:24 AM

View Postroeter, on 07 March 2017 - 03:23 AM, said:

The blueprint linked below describes the proposal to introduce user-defined signal function types :
Signal function types

My only comment from reading the blueprint is that, inside SIMIS-style files like sigcfg.dat, all of our existing extensions have been named like "ORTSNameOfItem" and you should follow that here, if it is not already (they are case-insensitive, but for documentation purposes the case is useful).

#3 User is offline   roeter 

  • Vice President
  • Group: Status: Elite Member
  • Posts: 2,424
  • Joined: 25-October 11
  • Gender:Male
  • Country:

Posted 20 March 2017 - 02:42 PM

OK - will check on that.

Regards,
Rob Roeterdink

#4 User is offline   Szilard 

  • Apprentice
  • Group: Status: Dispatcher
  • Posts: 20
  • Joined: 12-May 17
  • Gender:Male
  • Location:Hungary
  • Simulator:Open Rails
  • Country:

Posted 25 December 2018 - 01:41 PM

Merry Christmas!

I'm trying to use the normal subtypes (which I find very useful), but something is wrong, maybe the syntax. The log does not showing any error in the sigcfg.dat file (Openrails subfolder) only the function calls (find_req_normal_signal, this_sig_hasnormalsubtype, next_sig_hasnormalsubtype, id_sig_hasnormalsubtype) report some 'Warning: sigscr-file line xxxx : Unknown ORSUBTYPE : EXIT' warnings.

Definition in sigcfg.dat:

SIMISA@@@@@@@@@@JINX0G0t______

ENTRANCE : ORNORMALSUBTYPE
EXIT : ORNORMALSUBTYPE

LightTextures ( 5


Allocation to a specific signal type:

SignalType ( "4F_Max40Hi"	
	SignalFnType ( NORMAL )
	EXIT : OR_NORMALSUBTYPE
	SigFlashDuration ( 0.5 0.5 )
	SignalLightTex ( "ltex" )
	SignalLights ( 6
		SignalLight ( 0 "Voros"	Position ( 0 5.654 0.25 )	Radius ( 0.78 ) )
		SignalLight ( 1 "Sarga"	Position ( 0 5.35 0.25 )	Radius ( 0.78 ) )


And the function call in sigcfg.dat:

SCRIPT 3F_AT

	float			next_state;
	float			sigid;

	next_state = next_sig_lr (SIGFN_NORMAL);		// köv. NORMAL jelző állapota
	sigid = find_req_normal_signal( ORSUBTYPE_EXIT );	// következő kijárai jelző keresése


Could you help me, what could go wrong, or provide an example, how should I use it?

Best regards,
Szilárd

#5 User is offline   roeter 

  • Vice President
  • Group: Status: Elite Member
  • Posts: 2,424
  • Joined: 25-October 11
  • Gender:Male
  • Country:

Posted 26 December 2018 - 04:27 AM

Example : definition in sigcfg.dat
At top (before defining signal_types) :
ORTSNormalSubtypes ( 2
         ORTSNormalSubtype ( "MAIN" )
         ORTSNormalSubtype ( "SHUNT" )
)


Withing signal_type definition :
	SignalType ( "pt_bsig"
		SignalFnType ( NORMAL )
                ORTSNormalSubtype ( MAIN )


Regards,
Rob Roeterdink

#6 User is offline   eugenR 

  • Conductor
  • Group: Status: Contributing Member
  • Posts: 472
  • Joined: 15-April 13
  • Gender:Male
  • Simulator:MSTS
  • Country:

Posted 26 December 2018 - 08:31 AM

View Postroeter, on 26 December 2018 - 04:27 AM, said:

Example : definition in sigcfg.dat
At top (before defining signal_types) :
ORTSNormalSubtypes ( 2
         ORTSNormalSubtype ( "MAIN" )
         ORTSNormalSubtype ( "SHUNT" )
)


Withing signal_type definition :
	SignalType ( "pt_bsig"
		SignalFnType ( NORMAL )
                ORTSNormalSubtype ( MAIN )


Regards,
Rob Roeterdink


So I hope, this Block (placed before the ORTSNormalSubTypes) is o.k. to define additional ORTSSignalTypes:

ORTSSignalFunctions ( 2
	ORTSSignalFunctionType ( "TESTA" )
	ORTSSignalFunctionType ( "TESTB" )
)


best regards
EugenR

#7 User is offline   roeter 

  • Vice President
  • Group: Status: Elite Member
  • Posts: 2,424
  • Joined: 25-October 11
  • Gender:Male
  • Country:

Posted 26 December 2018 - 12:35 PM

Yes, that's good.

Regards,
Rob Roeterdink

#8 User is offline   Szilard 

  • Apprentice
  • Group: Status: Dispatcher
  • Posts: 20
  • Joined: 12-May 17
  • Gender:Male
  • Location:Hungary
  • Simulator:Open Rails
  • Country:

Posted 27 December 2018 - 05:33 AM

Hi!

View Postroeter, on 26 December 2018 - 04:27 AM, said:

Example : definition in sigcfg.dat
At top (before defining signal_types) :
ORTSNormalSubtypes ( 2
         ORTSNormalSubtype ( "MAIN" )
         ORTSNormalSubtype ( "SHUNT" )
)


Withing signal_type definition :
	SignalType ( "pt_bsig"
		SignalFnType ( NORMAL )
                ORTSNormalSubtype ( MAIN )



Regards,
Rob Roeterdink


Thank you for your answer, now the warning is gone, altough, the signal does not work as I expected. I tried to use debug_header and debug_out functions for clarifying the values of some local variables and enabled state of a signal, but I did it not successeded (Do they work in OR at all?) I'd like to bind the lit/unlit state of some 'interval' signal (since it does not work continously) to the following normal signal with a certain subtype.
OR clears the signals on the path ahead, but what happens with the 'enabled' property of the signal, when the train passes this signal? Does it change back to false?

Best Regards,
Szilárd

#9 User is offline   eugenR 

  • Conductor
  • Group: Status: Contributing Member
  • Posts: 472
  • Joined: 15-April 13
  • Gender:Male
  • Simulator:MSTS
  • Country:

Posted 28 December 2018 - 02:51 AM

View PostSzilard, on 25 December 2018 - 01:41 PM, said:

SCRIPT 3F_AT

	float			next_state;
	float			sigid;

	next_state = next_sig_lr (SIGFN_NORMAL);		// köv. NORMAL jelző állapota
	sigid = find_req_normal_signal( ORSUBTYPE_EXIT );	// következő kijárai jelző keresése


Could you help me, what could go wrong, or provide an example, how should I use it?

Best regards,
Szilárd


I have tried the function:
sigid = find_req_normal_signal(ORTSSUBTYPE_type)
it is working correct.
Have You realized, that all this Functions also has changed here Names from OR..... to ORTS.... ?
As mentioned by JamesRoss in Post#2

regards
EugenR

#10 User is offline   Szilard 

  • Apprentice
  • Group: Status: Dispatcher
  • Posts: 20
  • Joined: 12-May 17
  • Gender:Male
  • Location:Hungary
  • Simulator:Open Rails
  • Country:

Posted 28 December 2018 - 08:33 AM

View PosteugenR, on 28 December 2018 - 02:51 AM, said:

I have tried the function:
sigid = find_req_normal_signal(ORTSSUBTYPE_type)
it is working correct.
Have You realized, that all this Functions also has changed here Names from OR..... to ORTS.... ?
As mentioned by JamesRoss in Post#2

regards
EugenR


Hi!

I've tried with the ORTS prefix, but log file (X4331) says: 'Warning: sigscr-file line 4172 : Unknown parameter in statement : ORTSSUBTYPE_BEJARATI'. With ORSUBTYPE_ prefix, warning message disappeared, so probably that's the right syntax. Normal subtype definition and allocation to signaltypes are based on your previous post. I read James Ross' post about prefix change, but I didn't know is it whether a recommendation or a fact, so I used the information in the blueprint.
However, OR_SCRIPT and ORTSSCRIPT looks working both in Sigcfg.dat (no warning either way).

Thank you for all your help!

Best regards,
Szilárd

  • 2 Pages +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users