11.10-LVAF Advanced Document Reading

LV using XBOX ONE

  • 5GHZ wireless transmission
  • Using LV 's XBOX ONE Package can
  • Reference example

Network Endpoint Actors

  • Message Stream
    • Network Endpoints manage a Message Stream.  Message Stream is an abstract class that defines an API for transmitting Actor Framework messages between applications.  Children of this class adapt specific protocols, like TCP/IP or Network Streams to the API.  Message Streams will transmit and receive any message class.
  • Endpoint Network (endpoint)
    • Use Write Message Stream.vi to specify the Message Stream that will be used for the connection.  You must set this value prior to launching the actor.
    • Use Write timeout.vi to set the amount of time the actor will wait while attempting to create an endpoint (i.e. while waiting for a connection).
    • Network Endpoints have no message classes of their own; you can send any message class to an endpoint. Stop and Last Ack are handled locally; anything else is forwarded to the remote endpoint.
  • Endpoints the Nested (nested endpoint)
    • A Nested Endpoint is a Network Endpoint that is launched by a calling actor.
    • The nested endpoint will forward messages it receives from its caller across the network.    Any message the nested endpoint receives from across the network will be passed up to its caller.
    • Msg Connected (handshake?)
      • Nested Endpoints send a Connected Msg to their callers when they successfully connect to a remote endpoint (of any type).   Connected messages are abstract; the caller must provide the actual implementation to be used.  The payload of a Connected message is the nested endpoint’s enqueuer; use this data when you are using multiple nested endpoints, and need to identify which endpoint has successfully connected.
      • Payload explained: Payload

It records the portion of the data information. Typically during data transmission, in order to make more reliable data transfer, should transmit the raw data in batches, and both with a certain auxiliary information in the header and the end of each batch of data, such as the size of this group the amount of data, parity bits, etc., this is equivalent to the original data has been added portionwise several coats, jackets which play the role of marking, so that the original data easily lost. A number of data plus its "jacket", the transmission channel is formed in the basic transmission unit is called a data frame or packet (in some places and packet data frames are not the same concept such as a network transmission). These raw data information is recorded in the data frame is the payload data, i.e. payload data. The message body is to coat. That marks the size of the side information of the original data, and the like.

  • Use Write Connected Msg.vi to set a concrete implementation of Connected Msg to send to the caller.
  • Endpoints the Caller (primary endpoint)
    • A Caller Endpoint is a Network Endpoint that sits at the top of an actor tree.
    • Caller endpoints launch a single nested actor that you specify.
    • If a remote actor uses a nested endpoint to connect to a local caller endpoint, the caller endpoint's nested actor will act like a nested actor of the remote actor.
    • Use Read/Write Nested Actor.vi to get or set the nested actor called by the Caller Endpoint.
  • Streams the Message (message flows: encapsulates TCP / IP concept or network streams)
    • Passing an instance of TCP Stream Initiator to a network endpoint means the endpoint will attempt to connect to another endpoint. Passing an instance of TCP Stream Listener to a network endpoint means the endpoint will wait passively for a connection.  In either case, if no connection is made within the timeout period, the endpoint will shut down and return an error.
    • Both Initiator and Listener classes include a Create method.  Create methods take address information as inputs, and return a Message Stream object.
    • Message Streams can accept a Cipher plug-in, which you can use to encrypt/decrypt transmitted messages. Cipher is an abstract class; inherit from this class to add specific ciphers to your application.
  • Work Ideas
    • Main local side network operator transformation, the remote host installation the LV , establishing a framework project operator, to establish the main network operator transformation.
  • practice
    • All projects must have a file on two computers, but perform their own code, the code can make changes to their execution, they do not modify formal parameters (function definition) can be run properly
    • First open the remote TCP listening port, establishing nestedendpoint.lvclass set timeout length can be set longer, for example 10000ms . Note TCP long timeout invalid port settings when launched.

The Remote the Actor the Launch (nested network operator)

  • The teacher computer IP : 10.0.126.4
  • PTB10.0.126.13
  • LZS : 10.0.126.11
  • P3-AT10.0.126.3
  • The old version of the sample program execution error cause analysis
    • Principle: After obtaining the calling operator application references the distal end, the distal end looking through two proxy host operator VI and the call, the calling VI may pass some parameters, which includes a IP address.
    • Using the old version of the AF sample program after obtaining the application references, passing a wrong IP address, the IP address is not wired network card IP address, but the network address of the virtual network adapter virtual machine software.
    • So, on the main theme of the operator should uninstall both the host virtual network adapter in Device Manager (must be unloaded, but not disabled!)
    • When a problem occurs, to the remote host
  • The new version AF adapting the sample program
    • In both the old and new versions, in the LV can not be executed successfully organized by the Project Manager!
  • The transformation of the old version of the sample program
    • upperproxyactor core function port instead constants. The VI executes successfully, no error output.
    • Later still error has occurred, it can not be solved.
    • I wrote a document in a forum posting, waiting for reply.
    • See reply to another article notes [11.18]

The Actor Framework Project ProviderniACS[PDF]

  • Coupling the Messages for Zero Creating (zero coupling message) is useful! !
  • This method send.vi and DO.vi separately, greater flexibility so that, if a conventional main operator wants to send the same data to different types of sub-operations are required to define a complete in each sub-message in the operator function class, now only need to define a containing send.vi message virtual class, then inherit this subclass in each sub-operator, the sub-message contains a class created just DO.vi can be.
  • This alleviates the workload, enhanced code reuse.

MGI Actor Framework Message Maker

  • (slightly)

Should I use the AF?

  • technical level! Under what circumstances should use AF it?
    • After repeated use state machine projects
    • These operators have common characteristics, such as similar function
    • AF can reduce the time consumed to build your message mechanism, enhance code reuse
  • Non-technical aspects
    • Time, try to use a new framework is very time-consuming, especially if you are not familiar with LVOOP case of. If you for OO very familiar with, but also be able to devote himself to where you can try.
    • After the system architecture who maintain it? If they maintain, it is casual. If the customer is responsible for maintenance, they can not see the AF operator framework, it would be no problem.
    • Using the AF process, attention inheriting class division and function
    • As this is your first AF project, you can expect to have to do some rework before you are finished.  You'll design a set of actors, and then realize that you've missed an opportunity for inheritance, or that functionality in Actor A needs to be in Actor B. (To be honest, though, I have found that is always true, regardless of project, framework, or level of experience.  I've learned not to fear the rework.)  How tolerant of that necessity is your environment?
    • The current AF project templates too bad! But the sample project (evaporative cooler) is complete, but it is difficult to understand!
    • In a deep understanding of AF still has a long way to go frameworks! There must be time to seriously look at the technical documentation, this writing has a significant role for the understanding of software design patterns and papers.

Class Method Browser

  • (slightly)

Community search tips

  • (Not need to see, a little)

Guess you like

Origin www.cnblogs.com/lizhensheng/p/11241966.html