Difference between revisions of "ShieldCycler"

From Elite Wiki
m
(Added external functions)
Line 1: Line 1:
 
[[Image:OXPConfig_logo.png|150px|right]]
 
[[Image:OXPConfig_logo.png|150px|right]]
 +
 +
== Description ==
 +
 
Continually adjusts shield energy in automatic or manually chosen configuration.
 
Continually adjusts shield energy in automatic or manually chosen configuration.
  
Line 16: Line 19:
 
Details, comments, bugreports [http://aegidian.org/bb/viewtopic.php?p=138226 in the forum].
 
Details, comments, bugreports [http://aegidian.org/bb/viewtopic.php?p=138226 in the forum].
  
 +
== Functions ==
 +
=== _sc_stop() ===
 +
{{CodeEx|codeex=worldScripts["Shield Cycler"]._sc_stop = function(device)}}
 +
Stop SC devices
 +
 +
'''Parameters'''
 +
:;device :String.
 +
:;values :
 +
::"ALL" - stop all devices managed by Shield Cycler
 +
::"SC"  - stop SC devices only
 +
:: for current versions of SC there is no difference in results of the 2 options, but this will change in future versions.
 +
 +
 +
'''Returns'''
 +
:: -3 if Shield Cycler has been disabled
 +
:: -2 if device was already stopped
 +
:: -1 device == invalid value
 +
::  0 stopping was succesfull
 +
 +
=== _sc_start() ===
 +
{{CodeEx|codeex=worldScripts["Shield Cycler"]._sc_stop = function(device)}}
 +
 +
Start SC devices
 +
 +
'''Parameters'''
 +
:;device :String.
 +
:;values :
 +
::"ALL" - start all devices managed by Shield Cycler
 +
::"SC"  - start SC devices only
 +
:: for current versions of SC there is no difference in results of the 2 options, but this will change in future versions.
 +
 +
 +
'''Returns'''
 +
:: -2 if Shield Cycler is in disabled statusalready stopped
 +
:: -2 if device was already started
 +
:: -1 device == invalid value
 +
::  0 starting was succesfull
 +
 +
=== _sc_store_devices() ===
 +
{{CodeEx|codeex=worldScripts["Shield Cycler"]._sc_store_devices = function()}}
 +
 +
Allow other oxps like Ship Storage Helper to store values of SC devices
 +
 +
'''Parameters'''
 +
:;none
 +
 +
'''Returns'''
 +
:; an object with 2 strings
 +
:: first string holds SC values in JSON format
 +
:: second string is encrypted version of 1st string
 +
 +
=== _sc_retrieve_devices() ===
 +
{{CodeEx|codeex=worldScripts["Shield Cycler"]._sc_retrieve_devices = function(sc_values)}}
 +
 +
Allow other oxps like SSH to set SC devices
  
Downloads :
+
'''Parameters'''
 +
:;sc_values : object as created by _sc_store_devices
 +
 
 +
'''Returns'''
 +
:; integer
 +
:: 0 - import sucessfull
 +
:: 1 - input != an object
 +
:: 2 - sc_values has wrong structure
 +
:: 3 - first string in sc_values is invalid json data
 +
:: 4 - plain version doesn't match encrypted version
 +
:: 5 - stored data to old
 +
:: 6 - stored data to new
 +
 
 +
 
 +
== Downloads ==
  
 
Oolite 1.76 : [http://www.box.net/shared/n3hfrf5m93 ShieldCycler OXP v0.30.3].
 
Oolite 1.76 : [http://www.box.net/shared/n3hfrf5m93 ShieldCycler OXP v0.30.3].
Line 37: Line 109:
  
 
[[Media:ShieldCycler_Next_1.11.2.oxz|oxz format]] (downloaded {{#downloads:ShieldCycler_Next_1.11.2.oxz}} times).
 
[[Media:ShieldCycler_Next_1.11.2.oxz|oxz format]] (downloaded {{#downloads:ShieldCycler_Next_1.11.2.oxz}} times).
 +
  
  
 
[[Category:OXPConfig-compatible OXPs]] [[Category:Equipment OXPs]] [[Category:Oolite_expansion_packs]]
 
[[Category:OXPConfig-compatible OXPs]] [[Category:Equipment OXPs]] [[Category:Oolite_expansion_packs]]

Revision as of 19:58, 18 June 2015

OXPConfig logo.png

Description

Continually adjusts shield energy in automatic or manually chosen configuration.


Both - Equal shields aft and forward

Forward - Max forward shield, remainder on aft shield

Aft - Max aft shield, remainder (if any) on forward shield

Disabled : inactive

All adjustments are instantaneous, but use some ship energy.


Details, comments, bugreports in the forum.

Functions

_sc_stop()

worldScripts["Shield Cycler"]._sc_stop = function(device)

Stop SC devices

Parameters

device 
String.
values 
"ALL" - stop all devices managed by Shield Cycler
"SC" - stop SC devices only
for current versions of SC there is no difference in results of the 2 options, but this will change in future versions.


Returns

-3 if Shield Cycler has been disabled
-2 if device was already stopped
-1 device == invalid value
0 stopping was succesfull

_sc_start()

worldScripts["Shield Cycler"]._sc_stop = function(device)

Start SC devices

Parameters

device 
String.
values 
"ALL" - start all devices managed by Shield Cycler
"SC" - start SC devices only
for current versions of SC there is no difference in results of the 2 options, but this will change in future versions.


Returns

-2 if Shield Cycler is in disabled statusalready stopped
-2 if device was already started
-1 device == invalid value
0 starting was succesfull

_sc_store_devices()

worldScripts["Shield Cycler"]._sc_store_devices = function()

Allow other oxps like Ship Storage Helper to store values of SC devices

Parameters

none

Returns

an object with 2 strings
first string holds SC values in JSON format
second string is encrypted version of 1st string

_sc_retrieve_devices()

worldScripts["Shield Cycler"]._sc_retrieve_devices = function(sc_values)

Allow other oxps like SSH to set SC devices

Parameters

sc_values 
object as created by _sc_store_devices

Returns

integer
0 - import sucessfull
1 - input != an object
2 - sc_values has wrong structure
3 - first string in sc_values is invalid json data
4 - plain version doesn't match encrypted version
5 - stored data to old
6 - stored data to new


Downloads

Oolite 1.76 : ShieldCycler OXP v0.30.3.


Oolite 1.80+ Stable version 1.0 :

ShieldCycler oxp v.1.0

here OXZ format (downloaded 1703 times).


Oolite 1.82+

Development version 1.11.1

ShieldCycler Next 1.11.2, oxp format

oxz format (downloaded 43 times).