Package 

Class CanManager

    • Method Summary

      Modifier and Type Method Description
      MachineSignal readSignal(int signalId) Read a machine signal with the provided signalId.Throws SecurityException if caller don't holdsse.cpacsystems.permission.
      boolean writeSignal(int signalId, double value) Write a machine signal with the provided id to the provided value.Throws SecurityException if caller don't holdsse.cpacsystems.permission.
      int setupRxSignal(MachineSignalDefinition rxSignal) Setup a machine signal to receive.Throws SecurityException if caller don't holdsse.cpacsystems.permission.
      int setupTxSignal(MachineSignalDefinition txSignal) Setup a machine signal to transmit.Throws SecurityException if caller don't holdsse.cpacsystems.permission.
      GflHandler registerFrame(CanBus canBus, int frameId, boolean extended, byte maxQueueSize) Register the intent to receive can messages with the specified address.Throws SecurityException if caller don't holdsse.cpacsystems.permission.
      GflMsg readGflMsg(GflHandler handler) Read frame from a registered GflHandler.
      boolean writeFrame(CanBus canBus, int frameId, boolean extended, Array<byte> data) Write a can messages on the specified can-bus with the specified address.Throws SecurityException if caller don't holdsse.cpacsystems.permission.
      boolean unregisterFrame(GflHandler handler) Unregister a previously registered frame.Throws SecurityException if caller don't holdsse.cpacsystems.permission.
      MachineSignalDefinition getRxSignalDefinition(int signalId) Retrieve the definition of the rx machine signal identified by the provided gsl id.
      MachineSignalDefinition getTxSignalDefinition(int signalId) Retrieve the definition of the tx machine signal identified by the provided gsl id.
      long getBusFrameCount(CanBus canBus) Retrieve the number of frames received for the given can bus since start of serviceor the last call to resetBusFrameCount()
      long getRxSignalFrameCount(int signalId) Retrieve the number of frames received for the given gsl signal since start of serviceor the last call to resetRxSignalFrameCount()
      boolean resetBusFrameCount(CanBus canBus) Reset the number of frames received for the given can bus.
      boolean resetRxSignalFrameCount(int signalId) Reset the number of frames received for the given gsl signal.This call affects all signals defined on the same frame id.
      boolean isConnected()
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • CanManager

        CanManager(Context context)
    • Method Detail

      • readSignal

         MachineSignal readSignal(int signalId)

        Read a machine signal with the provided signalId.Throws SecurityException if caller don't holdsse.cpacsystems.permission.READ_MACHINE_SIGNAL

        Parameters:
        signalId - Id of the desired signal
      • writeSignal

         boolean writeSignal(int signalId, double value)

        Write a machine signal with the provided id to the provided value.Throws SecurityException if caller don't holdsse.cpacsystems.permission.WRITE_MACHINE_SIGNAL

        Parameters:
        signalId - The id of the signal to write
        value - The value to write
      • setupRxSignal

         int setupRxSignal(MachineSignalDefinition rxSignal)

        Setup a machine signal to receive.Throws SecurityException if caller don't holdsse.cpacsystems.permission.READ_MACHINE_SIGNAL

        Parameters:
        rxSignal - Definition of the signal to transmit
      • setupTxSignal

         int setupTxSignal(MachineSignalDefinition txSignal)

        Setup a machine signal to transmit.Throws SecurityException if caller don't holdsse.cpacsystems.permission.WRITE_MACHINE_SIGNAL

        Parameters:
        txSignal - Definition of the desired signal
      • registerFrame

         GflHandler registerFrame(CanBus canBus, int frameId, boolean extended, byte maxQueueSize)

        Register the intent to receive can messages with the specified address.Throws SecurityException if caller don't holdsse.cpacsystems.permission.READ_MACHINE_SIGNAL

        Parameters:
        canBus - The bus (CAN1-CAN6) to receive messages on
        frameId - The address of messages to receive
        extended - True for extended addressing and false for standard
        maxQueueSize - The maximum number of messages to save
      • readGflMsg

         GflMsg readGflMsg(GflHandler handler)

        Read frame from a registered GflHandler.

        Parameters:
        handler - a GflHandler returned from registerFrame()
      • writeFrame

         boolean writeFrame(CanBus canBus, int frameId, boolean extended, Array<byte> data)

        Write a can messages on the specified can-bus with the specified address.Throws SecurityException if caller don't holdsse.cpacsystems.permission.WRITE_MACHINE_SIGNAL

        Parameters:
        canBus - The bus (CAN4,CAN5,CAN6) to receive messages on
        frameId - The address of messages to receive
        extended - True for extended addressing and false for standard
        data - Data to transmit
      • unregisterFrame

         boolean unregisterFrame(GflHandler handler)

        Unregister a previously registered frame.Throws SecurityException if caller don't holdsse.cpacsystems.permission.READ_MACHINE_SIGNAL

        Parameters:
        handler - a GflHandler returned from registerFrame()
      • getRxSignalDefinition

         MachineSignalDefinition getRxSignalDefinition(int signalId)

        Retrieve the definition of the rx machine signal identified by the provided gsl id.

        Parameters:
        signalId - the Id of the requested signal.
      • getTxSignalDefinition

         MachineSignalDefinition getTxSignalDefinition(int signalId)

        Retrieve the definition of the tx machine signal identified by the provided gsl id.

        Parameters:
        signalId - the Id of the requested signal.
      • getBusFrameCount

         long getBusFrameCount(CanBus canBus)

        Retrieve the number of frames received for the given can bus since start of serviceor the last call to resetBusFrameCount()

        Parameters:
        canBus - the can bus to retrieve statistics for.
      • getRxSignalFrameCount

         long getRxSignalFrameCount(int signalId)

        Retrieve the number of frames received for the given gsl signal since start of serviceor the last call to resetRxSignalFrameCount()

        Parameters:
        signalId - the Id of the requested signal.
      • resetBusFrameCount

         boolean resetBusFrameCount(CanBus canBus)

        Reset the number of frames received for the given can bus.

        Parameters:
        canBus - the Id of the bus to reset.
      • resetRxSignalFrameCount

         boolean resetRxSignalFrameCount(int signalId)

        Reset the number of frames received for the given gsl signal.This call affects all signals defined on the same frame id.

        Parameters:
        signalId - the Id of the signal to reset the counter for.