Package net.paulhertz.pixelaudio.example

# Class TutorialOne_04_Network.NetworkDelegate

java.lang.Object
net.paulhertz.pixelaudio.example.TutorialOne_04_Network.NetworkDelegate

Enclosing class:
  TutorialOne_04_Network

public class TutorialOne_04_Network.NetworkDelegate extends Object
A class to handle network connections over UDP, for example, with a Max or Pd patch. Used by applications that implement the PANetworkClientINF.

See Also:
  - `PANetworkClientINF`

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `private PANetworkClientINF`
  `app`
  `private int`
  `drawCount`
  `private int`
  `inPort`
  `private oscP5.OscP5`
  `osc`
  `private int`
  `outPort`
  `private processing.core.PApplet`
  `parent`
  `private netP5.NetAddress`
  `remoteFrom`
  `private String`
  `remoteFromAddress`
  `private netP5.NetAddress`
  `remoteTo`
  `private String`
  `remoteToAddress`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `NetworkDelegate(PANetworkClientINF app)`
  `NetworkDelegate(PANetworkClientINF app, String remoteFromAddr, String remoteToAddr)`
  `NetworkDelegate(PANetworkClientINF app, String remoteFromAddr, String remoteToAddr, int inPort, int outPort)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `controlMsg(String ctrl, float val)`
  `void`
  `drawHit(int... args)`
  `int`
  `getDrawCount()`
  `int`
  `getInPort()`
  `int`
  `getOutPort()`
  `netP5.NetAddress`
  `getRemoteFrom()`
  `netP5.NetAddress`
  `getRemoteTo()`
  `void`
  `init()`
  `void`
  `initOscPlugs()`
  SET UP RESPONSE TO INCOMING MESSAGES Call the osc.plug(Object theObject, String the MethodName, String theAddrPattern) or osc.plug(Object theObject, String the MethodName, String theAddrPattern, String the TypeTag) to setup callbacks to methods in the current object ("this") or other object instance.
  `void`
  `multislider(int... args)`
  `(package private) void`
  `oscEvent(oscP5.OscMessage theOscMessage)`
  `void`
  `oscSendClear()`
  `void`
  `oscSendDelete(int index)`
  `void`
  `oscSendDrawPoints(ArrayList<processing.core.PVector> drawPoints)`
  `void`
  `oscSendFileInfo(String path, String name, String tag)`
  `void`
  `oscSendMousePressed(int sampleX, int sampleY, int sample)`
  `void`
  `oscSendMultiSlider(ArrayList<processing.core.PVector> drawPoints)`
  `void`
  `oscSendOnOff(int index, boolean state)`
  `void`
  `oscSendSetnum(int index, float value)`
  `void`
  `oscSendTimeStamp(int timeStamp, int timeOffset)`
  `void`
  `oscSendTrig(int index)`
  `void`
  `parseKey(int arg)`
  `void`
  `sampleHit(int sam)`
  `void`
  `setDrawCount(int drawCount)`
  `void`
  `setInPort(int inPort)`
  `void`
  `setOutPort(int outPort)`
  `void`
  `setRemoteFrom(netP5.NetAddress remoteFrom)`
  `void`
  `setRemoteTo(netP5.NetAddress remoteTo)`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### parent

    private processing.core.PApplet parent

  - ### app

    private PANetworkClientINF app

  - ### osc

    private oscP5.OscP5 osc

  - ### inPort

    private int inPort

  - ### outPort

    private int outPort

  - ### remoteFromAddress

    private String remoteFromAddress

  - ### remoteToAddress

    private String remoteToAddress

  - ### remoteFrom

    private netP5.NetAddress remoteFrom

  - ### remoteTo

    private netP5.NetAddress remoteTo

  - ### drawCount

    private int drawCount

- ## Constructor Details

  - ### NetworkDelegate

    public NetworkDelegate(PANetworkClientINF app, String remoteFromAddr, String remoteToAddr, int inPort, int outPort)

  - ### NetworkDelegate

    public NetworkDelegate(PANetworkClientINF app, String remoteFromAddr, String remoteToAddr)

  - ### NetworkDelegate

    public NetworkDelegate(PANetworkClientINF app)

- ## Method Details

  - ### init

    public void init()

  - ### getInPort

    public int getInPort()

  - ### setInPort

    public void setInPort(int inPort)

  - ### getOutPort

    public int getOutPort()

  - ### setOutPort

    public void setOutPort(int outPort)

  - ### getRemoteFrom

    public netP5.NetAddress getRemoteFrom()

  - ### setRemoteFrom

    public void setRemoteFrom(netP5.NetAddress remoteFrom)

  - ### getRemoteTo

    public netP5.NetAddress getRemoteTo()

  - ### setRemoteTo

    public void setRemoteTo(netP5.NetAddress remoteTo)

  - ### getDrawCount

    public int getDrawCount()

  - ### setDrawCount

    public void setDrawCount(int drawCount)

  - ### initOscPlugs

    public void initOscPlugs()
    SET UP RESPONSE TO INCOMING MESSAGES Call the osc.plug(Object theObject, String the MethodName, String theAddrPattern) or osc.plug(Object theObject, String the MethodName, String theAddrPattern, String the TypeTag) to setup callbacks to methods in the current object ("this") or other object instance.

  - ### oscEvent

    void oscEvent(oscP5.OscMessage theOscMessage)

  - ### oscSendMousePressed

    public void oscSendMousePressed(int sampleX, int sampleY, int sample)

  - ### oscSendMultiSlider

    public void oscSendMultiSlider(ArrayList<processing.core.PVector> drawPoints)

  - ### oscSendDrawPoints

    public void oscSendDrawPoints(ArrayList<processing.core.PVector> drawPoints)

  - ### oscSendTimeStamp

    public void oscSendTimeStamp(int timeStamp, int timeOffset)

  - ### oscSendTrig

    public void oscSendTrig(int index)

  - ### oscSendOnOff

    public void oscSendOnOff(int index, boolean state)

  - ### oscSendSetnum

    public void oscSendSetnum(int index, float value)

  - ### oscSendDelete

    public void oscSendDelete(int index)

  - ### oscSendClear

    public void oscSendClear()

  - ### oscSendFileInfo

    public void oscSendFileInfo(String path, String name, String tag)

  - ### sampleHit

    public void sampleHit(int sam)

  - ### drawHit

    public void drawHit(int... args)

  - ### multislider

    public void multislider(int... args)

  - ### parseKey

    public void parseKey(int arg)

  - ### controlMsg

    public void controlMsg(String ctrl, float val)