Eln Computer Probe

From Electrical Age
Revision as of 14:25, 6 January 2017 by Omega Haxors (talk | contribs) (Aha! I have cracked the function's use!)

Jump to: navigation, search

The Eln Computer Probe is a block which allows a computer to read and manipulate signals passing through it.

The functions it provides do not contain an internal API, so they will be defined here:

  • signalSetDir("side","in" or "out") - Sets the direction a signal flows on the specified side. Both arguments must be strings, and are case-sensitive. Always returns nil.
  • signalGetDir("side") - Used to determine if the specified side is in "in" or "out" mode.
  • signalGetIn("side") - Gets the signal strength as a percentage. Multiply by 50 to get exact voltage value.
  • signalSetOut() - If the side is set to "out" use this function to set the signal's strength as a percentage. Divide by 50 to use the exact voltage value.
  • wirelessGet("channel name") - Gets the wireless signal strength as a percentage, uses channel name rather than side.
  • wirelessSet(channel name,number) - Sets the signal strength of the specified channel name. Uses the same percentage value. Divide by 50 to use exact voltage value.
  • wirelessRemoveAll() - Clears the wireless channels within the block. This is used to disable all wireless interactions in a single command.


Directions

When a probe is placed, 6 sides will appear printed on the sides of the block. These always face the same way, no matter which direction you place the block in. These are used to control the previous functions, usually to specify which side to operate the function on. Its naming structure is a reference to transistors, where P-type is considered positive and N-type is considered negative. The x and y refers to the co-ordinate value.

  • XN - Faces West; its enum value is 0.
  • XP - Faces East; its enum value is 1. (Shows backwards on the block)
  • YN - Faces Ground; its enum value is 2. (Does not show up on block)
  • YP - Faces Skyward; its enum value is 3. (Does not show on the block)
  • ZN - Faces North; its enum value is 4. (Shows backwards on the block)
  • ZP - Faces South; its enum value is 5.