Components of an MMlite Project - PowerPoint PPT Presentation

1 / 19
About This Presentation
Title:

Components of an MMlite Project

Description:

... a unique number for each ... an initialization function to setup driver resources. ... h files for all drivers used by this client program. Client Program ... – PowerPoint PPT presentation

Number of Views:33
Avg rating:3.0/5.0
Slides: 20
Provided by: rnp6
Category:

less

Transcript and Presenter's Notes

Title: Components of an MMlite Project


1
Components of an MMlite Project
  • Richard Neil Pittman
  • Texas AM University
  • 2006

2
MMlite Project Hierarchy
  • Client Program (.cpp ? .exe)
  • Driver ((.c .h) ? .cob)
  • Object File (.c)
  • .c File
  • .h File
  • Note A project can contain multiple drivers.

3
MMlite Projects
  • Client Program The top level software
    application that creates and releases instances
    of driver objects and request services from them.
  • Driver A software object that provides services
    through functions that can be called by a client
    program. This driver can interface to a
    peripheral device or encapsulate software
    components

4
Drivers
5
.c File
  • This file contains the GUID for your driver.
    This must be a unique number for each driver.
    Use the GUID tool from Visual Studio to generate
    these.

6
.h File
  • This file contains the v-table for your driver.
    The v-table is a directory of the functions
    contained within this driver that are available
    to clients.

7
Object File
  • Must include the .c .h files for this driver.

8
Object File
  • Declare and instantiate v-table.

9
Object File
  • All drivers include QueryInterface(), AddRef()
    Release() Functions

10
Object File
  • Declare and implement the Driver Functions

11
Object File
  • Populate the v-table with Driver Functions.
  • IMPORTANT The functions listed must be in the
    same order they are listed in the .h File

12
Object File
  • All drivers must have an initialization function
    to setup driver resources. (reference, pins,
    variables, etc.)

13
Object File
  • The initialization function must be called within
    the CobMain() of the driver

14
Client Program
15
Client Program
  • Must include the .c .h files for all drivers
    used by this client program

16
Client Program
  • Declare driver object pointers.

17
Client Program
  • Assign pointer to current namespace.

18
Client Program
  • Bind driver cob to unknown object.

19
Client Program
  • Query the driver interface and enter application
    loop.
Write a Comment
User Comments (0)
About PowerShow.com