Tews Technologies TIP815-SW-12 Manual

Os-9 device driver for tip815 arcnet interface ip

Advertisement

Quick Links

TIP815--SW--12
OS--9 Device Driver
for TIP815 ARCNET Interface IP
Version 1.4
Revision 1.1
22 June 1999
TEWS DATENTECHNIK GmbH
Am Bahnhof 7
D--25469 Halstenbek
Tel.: +49 (0)4101 4058 0
Fax: +49 (0)4101 4058 19
EMail: Support@tews.com
Web: http://www.tews.com
Germany

Advertisement

Table of Contents
loading

Summary of Contents for Tews Technologies TIP815-SW-12

  • Page 1 TIP815--SW--12 OS--9 Device Driver for TIP815 ARCNET Interface IP Version 1.4 Revision 1.1 22 June 1999 TEWS DATENTECHNIK GmbH Am Bahnhof 7 D--25469 Halstenbek Germany Tel.: +49 (0)4101 4058 0 Fax: +49 (0)4101 4058 19 EMail: Support@tews.com Web: http://www.tews.com...
  • Page 2 TIP815--SW--12 ARCNET Interface IP OS--9 Device Driver This document contains information, which is proprietary to TEWS DATENTECHNIK GmbH. Any reproduction without written permission is forbidden. TEWS DATENTECHNIK GmbH has made any effort to ensure that this manual is accurate and complete.
  • Page 3: Table Of Contents

    1. Introduction ......... 2.
  • Page 4: Introduction

    1. Introduction The TIP815--SW--12 OS--9 device driver allows the operation of the TIP815 ARCNET IP with a device--independent interface with t815_open, t815_read, t815_write and t815_cntrl functions. After installation of the device driver in the I/O system messages can be transmitted to and received from the ARCNET Interface by calling the t815_write() or t815_read() functions.
  • Page 5: Installation

    2.Installation The TIP815--SW--12 OS--9 driver software is delivered on a 3.5”floppy disc. The floppy has following contents: /d0/tip815/t815driv.c TIP815 device driver C source /d0/tip815/t815adriv.a TIP815 device driver assembler to C interface /d0/tip815/t815cif.a TIP815 device driver application call interface /d0/tip815/t815stat.a TIP815 device static storage allocation /d0/tip815/t815A.a TIP815 device descriptor IP- -slot A (MVME162) /d0/tip815/t815B.a...
  • Page 6: I/O Interface Functions

    3.I/O interface functions This chapter describes the interface to the I/O system used for communication over the ARCNET Interface. 3.1. t815_open() NAME t815_open() - - open a path to a TIP815 device SYNOPSIS int t815_open ( DeviceName, PathNr ) char *DeviceName;...
  • Page 7: T815_Close()

    3.2. t815_close() NAME t815_close() - - close a path to a TIP815 device SYNOPSIS int t815_close ( PathNr ) PathNr; /* path number */ DESCRIPTION Terminates the I/O path specified by PathNr. RETURNS returns E_NOERR (0) if the device was successful closed, or an appropriate error code. SEE ALSO I/O system call I$Close...
  • Page 8: T815_Read()

    3.3. t815_read() NAME t815_read() - - read a message from specified TIP815 device SYNOPSIS int t815_read ( PathNr, io_flags, MsgBuf) PathNr; /* Path number */ io_flags; /* I/O flags : [ T815_FLUSH | T815_NOWAIT ] */ T815_MSG *MsgBuf; /* Pointer to the message buffer */ DESCRIPTION Once a TIP815 device has been opened, tasks can read messages from the device.
  • Page 9 EXAMPLE #include ” tip815.h” T815_MSG rcvbuf; status; path; status = t815_open ( ” /t815A” , &path); read a message from opened TIP815 device. o flush the input ring buffer before reading o return immediately if there is no message available status = t815_read ( path, T815_FLUSH | T815_NOWAIT, &rcvbuf );...
  • Page 10: T815_Write()

    3.4. t815_write() NAME t815_write() - - write a message to specified TIP815 device SYNOPSIS int t815_write ( PathNr, io_flags, MsgBuf) PathNr; /* Path number */ io_flags; /* I/O flags : [ T815_NOWAIT ] */ T815_MSG *MsgBuf; /* Pointer to the message buffer */ DESCRIPTION This routine write a message to the specified TIP815 device.
  • Page 11 EXAMPLE #include ” tip815.h” #define HELLO ” HELLOOOO WORLD” T815_MSG sndbuf; status; path; status = t815_open ( ” /t815A” , &path); t815_write a message to a TIP815 device. sndbuf.DID = 123; sndbuf.len = 14; memcpy(sndbuf.data, HELLO, 14); status = t815_write ( path, 0, &sndbuf ); if (result != E_NOERR) { /* handle device error */ ..
  • Page 12: T815_Cntrl()

    3.5. t815_cntrl() NAME t815_cntrl() - - perform an I/O control function SYNOPSIS int t815_cntrl ( PathNr, io_flags, function, arg ) PathNr; /* Path number */ io_flags; /* I/O flags : [ T815_BROADCAST | */ /* T815_LONGPACKET | T815_NODE_ID ] */ function;...
  • Page 13 The parameter network_timeout specifies the Response, Idle and Recon Times of the ARCNET controller. All nodes should be configured with the same timeout value for proper network operation. Valid values are: for (TIP815- -10/- -20) value Response (µs) Idle Time (µs) Reconfig Time (ms) 1130 1237 1680...
  • Page 14 EXAMPLE #include ” tip815.h” status; recon; unsigned char map[32]; path; T815_CONF conf; status = t815_open ( ” /t815A” , &path); Initialize the ARCNET controller and entering the network o accept broadcast messages from the network. o receive both short and long packets o use node ID specified in node_id o setup network speed to 2.5 Mbps o response time = 1130 µs...
  • Page 15 status = t815_cntrl ( path, 0, SS_MAP , (int)map ); if (map[1] & 0x02) printf(”node 9 is available \n” ); /*- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- - Flush the t815_read ring buffer - -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -*/ status = t815_cntrl ( path, 0, SS_FLUSH, 0 );...
  • Page 16: Device Descriptor

    4.Device Descriptor The Device descriptor contain all that OS- -9 needs to know about a device. All device descriptors have some basic information in common: the address of the device, the interrupt vector, level and polling priority, which file manager to use with it (scf), what device driver to use with it (t815driv) and a device initialization table.
  • Page 17: Appendix

    5. Appendix 5.1. Predefined Symbols The following symbols are predefined in the the include file tip815.h. t815_cntrl function codes SS_MAP Build a map of nodes contained on the network SS_ONLINE Initialize the ARCNET controller and entering the network SS_OFFLINE Shutdown the node hardware and remove the node from the network SS_DIAG Get number of node reconfigurations...
  • Page 18: Status And Error Codes

    5.2. Status and Error Codes E_NOERR Operation successful completed E_NXIO 0x100 No TIP815 device found at specified address E_ICMD 0x102 Illegal t815_cntrl command E_NOTACK 0x104 No ACK from receiver after transmission E_TIMEOUT 0x105 Transmission times out E_QFULL 0x106 The read ring buffer for incoming messages is full E_BAD_PACKET_SIZE 0x107...

Table of Contents