New Controls Work
JDK 1.3 API

gov.fnal.controls.acnet
Class AcnetWrite

java.lang.Object
  |
  +--gov.fnal.controls.acnet.AcnetWrite

public class AcnetWrite
extends Object

Support for writing to the Acnet socket. Acnet usage is restricted to server engines.

Version:
2.04
Last modified: 13 Nov 1998 /GCJ - modify header if trunk/node changed
Author:
Kevin Cahill

Field Summary
static int ACNET_BMAX_MESSAGE_SIZE
          maximum size of big Acnet message, excluding header
static int ACNET_MAX_MESSAGE_SIZE
           
protected static boolean didPassthru
          flag set true if passthru required
protected static short pktrNode
          Packetter trunk and node
protected static short pktrTrunk
          Packetter trunk and node
protected static short vaxNode
          VAX trunk and node which may be used for passthru
protected static short vaxTrunk
          VAX trunk and node which may be used for passthru
 
Constructor Summary
AcnetWrite()
           
 
Method Summary
protected static int acnetSendPacket(AcnetHeader aHdr)
          send a status-only Acnet packet.
protected static int acnetSendPacket(AcnetHeader aHdr, byte[] userData, int userLen, int userOffset)
          send an Acnet packet.
static short[] getAcnetTrunkNode(String name)
          get an Acnet trunk and node with automatic translation to alternate IP trunk and node (if available)
static String getLocalAcnet()
          get local trunk/node text string
static int getTotalPacketsWritten()
          get the total number of packets written
static boolean isClassBugs()
          inquire on the state of the debug message switch.
static String reportStatistics()
          Return a statistics report.
static void setClassBugs(boolean onOff)
          set the state of the debug message switch.
static void setJPassNode(String nodeName)
          set the default vax JPASS node.
static void setWriteSocket(DatagramSocket s)
          set the socket to be used for Acnet communications.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ACNET_MAX_MESSAGE_SIZE

public static final int ACNET_MAX_MESSAGE_SIZE

ACNET_BMAX_MESSAGE_SIZE

public static final int ACNET_BMAX_MESSAGE_SIZE
maximum size of big Acnet message, excluding header

pktrTrunk

protected static short pktrTrunk
Packetter trunk and node

pktrNode

protected static short pktrNode
Packetter trunk and node

vaxTrunk

protected static short vaxTrunk
VAX trunk and node which may be used for passthru

vaxNode

protected static short vaxNode
VAX trunk and node which may be used for passthru

didPassthru

protected static boolean didPassthru
flag set true if passthru required
Constructor Detail

AcnetWrite

public AcnetWrite()
Method Detail

setJPassNode

public static void setJPassNode(String nodeName)
set the default vax JPASS node.
Parameters:
nodeName - JPASS node

setClassBugs

public static void setClassBugs(boolean onOff)
set the state of the debug message switch.
Parameters:
onOff - boolean state for the switch
Returns:
true if debug messaging is on, otherwise false.

isClassBugs

public static boolean isClassBugs()
inquire on the state of the debug message switch.
Returns:
true if debug messaging is on, otherwise false.

getTotalPacketsWritten

public static int getTotalPacketsWritten()
get the total number of packets written
Returns:
total number of packets

getAcnetTrunkNode

public static short[] getAcnetTrunkNode(String name)
get an Acnet trunk and node with automatic translation to alternate IP trunk and node (if available)
Parameters:
name - the Acnet node name
Returns:
trunk + node as array: trunk first (-1,-1 if error)

getLocalAcnet

public static String getLocalAcnet()
get local trunk/node text string
Returns:
String describing local node

setWriteSocket

public static void setWriteSocket(DatagramSocket s)
set the socket to be used for Acnet communications.
Parameters:
s - the Datagram socket

acnetSendPacket

protected static int acnetSendPacket(AcnetHeader aHdr)
send a status-only Acnet packet.
Parameters:
aHdr - the Acnet header
Returns:
the status of the send.

acnetSendPacket

protected static int acnetSendPacket(AcnetHeader aHdr,
                                     byte[] userData,
                                     int userLen,
                                     int userOffset)
send an Acnet packet.
Parameters:
aHdr - the Acnet header
userData - the user data
userLength - the length of the user data
userOffset - the offset from the beginning of the user data to send
Returns:
the status of the send.

reportStatistics

public static String reportStatistics()
Return a statistics report.
Returns:
a statistics report

New Controls Work
JDK 1.3 API

Generated Wed Jul 11 09:44:20 2001 by devoy using alphadoc v1.0

Copyright © 2000-2001, Universities Research Association, Inc. All rights reserved.