Writing Player Driver

The Writing Center Campus Box 5137 SASB North Suite 0127 UNC-CH Chapel Hill, NC 27599 CSSAC Home phone: 919 962-7710 email: writing_center.

writing player driver Evidence

Movie Magic Screenwriter. 149.95. The most advanced screenwriting software available, Movie Magic is deemed a preferred file format by the Writer.

Writing a Player driver

Mini MP3 player comparison Review date: 11 February 2003. Last modified 03-Dec-2011. Here s how I want a digital audio player to work. I want it to just plug into my.

The Writers For Hire is a team of Houston based copywriters, ghostwriters and editors specializing in copy for business, web, non-fiction and fiction ghostwriting.

Do you pine for the nice days of Minix-1.1, when men were men and wrote their own device drivers. Linus Torvalds Pre-requisites In order to develop Linux device.

I make my living writing online, and help others do the same. My Newsletter, Books Programs About Writing For The Web.

What this handout is about

This handout will provide a broad overview of gathering and using evidence. It will help you decide what counts as evidence, put evidence to work in your writing, and determine whether you have enough evidence. It will also offer links to additional resources.

Introduction

Many papers that you write in college will require you to make an argument; this means that you must take a position on the subject you are discussing and support that position with evidence. It s important that you use the right kind of evidence, that you use it effectively, and that you have an appropriate amount of it. If, for example, your philosophy professor didn t like it that you used a survey of public opinion as your primary evidence in your ethics paper, you need to find out more about what philosophers count as good evidence. If your instructor has told you that you need more analysis, suggested that you re just listing points or giving a laundry list, or asked you how certain points are related to your argument, it may mean that you can do more to fully incorporate your evidence into your argument. Comments like for example., proof., go deeper, or expand in the margins of your graded paper suggest that you may need more evidence. Let s take a look at each of these issues understanding what counts as evidence, using evidence in your argument, and deciding whether you need more evidence.

What counts as evidence.

Before you begin gathering information for possible use as evidence in your argument, you need to be sure that you understand the purpose of your assignment. If you are working on a project for a class, look carefully at the assignment prompt. It may give you clues about what sorts of evidence you will need. Does the instructor mention any particular books you should use in writing your paper or the names of any authors who have written about your topic. How long should your paper be longer works may require more, or more varied, evidence. What themes or topics come up in the text of the prompt. Our handout on understanding writing assignments can help you interpret your assignment. It s also a good idea to think over what has been said about the assignment in class and to talk with your instructor if you need clarification or guidance.

What matters to instructors.

Instructors in different academic fields expect different kinds of arguments and evidence your chemistry paper might include graphs, charts, statistics, and other quantitative data as evidence, whereas your English paper might include passages from a novel, examples of recurring symbols, or discussions of characterization in the novel. Consider what kinds of sources and evidence you have seen in course readings and lectures. You may wish to see whether the Writing Center has a handout regarding the specific academic field you re working in for example, literature, sociology, or history.

What are primary and secondary sources.

A note on terminology: many researchers distinguish between primary and secondary sources of evidence in this case, primary means first or original, not most important. Primary sources include original documents, photographs, interviews, and so forth. Secondary sources present information that has already been processed or interpreted by someone else. For example, if you are writing a paper about the movie The Matrix, the movie itself, an interview with the director, and production photos could serve as primary sources of evidence. A movie review from a magazine or a collection of essays about the film would be secondary sources. Depending on the context, the same item could be either a primary or a secondary source: if I am writing about people s relationships with animals, a collection of stories about animals might be a secondary source; if I am writing about how editors gather diverse stories into collections, the same book might now function as a primary source.

Where can I find evidence.

Here are some examples of sources of information and tips about how to use them in gathering evidence. Ask your instructor if you aren t sure whether a certain source would be appropriate for your paper.

Print and electronic sources

Books, journals, websites, newspapers, magazines, and documentary films are some of the most common sources of evidence for academic writing. Our handout on evaluating print sources will help you choose your print sources wisely, and the library has a tutorial on evaluating both print sources and websites. A librarian can help you find sources that are appropriate for the type of assignment you are completing. Just visit the reference desk at Davis or the Undergraduate Library or chat with a librarian online the library s IM screen name is undergradref.

Observation

Sometimes you can directly observe the thing you are interested in, by watching, listening to, touching, tasting, or smelling it. For example, if you were asked to write about Mozart s music, you could listen to it; if your topic was how businesses attract traffic, you might go and look at window displays at the mall.

Interviews

An interview is a good way to collect information that you can t find through any other type of research. An interview can provide an expert s opinion, biographical or first-hand experiences, and suggestions for further research.

Surveys

Surveys allow you to find out some of what a group of people thinks about a topic. Designing an effective survey and interpreting the data you get can be challenging, so it s a good idea to check with your instructor before creating or administering a survey.

Experiments

Experimental data serve as the primary form of scientific evidence. For scientific experiments, you should follow the specific guidelines of the discipline you are studying. For writing in other fields, more informal experiments might be acceptable as evidence. For example, if you want to prove that food choices in a cafeteria are affected by gender norms, you might ask classmates to undermine those norms on purpose and observe how others react. What would happen if a football player were eating dinner with his teammates and he brought a small salad and diet drink to the table, all the while murmuring about his waistline and wondering how many fat grams the salad dressing contained.

Personal experience

Using your own experiences can be a powerful way to appeal to your readers. You should, however, use personal experience only when it is appropriate to your topic, your writing goals, and your audience. Personal experience should not be your only form of evidence in most papers, and some disciplines frown on using personal experience at all. For example, a story about the microscope you received as a Christmas gift when you were nine years old is probably not applicable to your biology lab report.

Using evidence in an argument

Does evidence speak for itself.

Absolutely not. After you introduce evidence into your writing, you must say why and how this evidence supports your argument. In other words, you have to explain the significance of the evidence and its function in your paper. What turns a fact or piece of information into evidence is the connection it has with a larger claim or argument: evidence is always evidence for or against something, and you have to make that link clear.

As writers, we sometimes assume that our readers already know what we are talking about; we may be wary of elaborating too much because we think the point is obvious. But readers can t read our minds: although they may be familiar with many of the ideas we are discussing, they don t know what we are trying to do with those ideas unless we indicate it through explanations, organization, transitions, and so forth. Try to spell out the connections that you were making in your mind when you chose your evidence, decided where to place it in your paper, and drew conclusions based on it. Remember, you can always cut prose from your paper later if you decide that you are stating the obvious.

Here are some questions you can ask yourself about a particular bit of evidence. Answering them may help you explain how your evidence is related to your overall argument:

O.k., I ve just stated this point, but so what. Why is it interesting. Why should anyone care.

What does this information imply.

What are the consequences of thinking this way or looking at a problem this way.

I ve just described what something is like or how I see it, but why is it like that.

I ve just said that something happens-so how does it happen. How does it come to be the way it is.

Why is this information important. Why does it matter.

How is this idea related to my thesis. What connections exist between them. Does it support my thesis. If so, how does it do that.

Can I give an example to illustrate this point.

How can I incorporate evidence into my paper.

There are many ways to present your evidence. Often, your evidence will be included as text in the body of your paper, as a quotation, paraphrase, or summary. Sometimes you might include graphs, charts, or tables; excerpts from an interview; or photographs or illustrations with accompanying captions.

Quotations

When you quote, you are reproducing another writer s words exactly as they appear on the page. Here are some tips to help you decide when to use quotations:

Quote if you can t say it any better and the author s words are particularly brilliant, witty, edgy, distinctive, a good illustration of a point you re making, or otherwise interesting.

Quote if you are using a particularly authoritative source and you need the author s expertise to back up your point.

Quote if you are analyzing diction, tone, or a writer s use of a specific word or phrase.

Quote if you are taking a position that relies on the reader s understanding exactly what another writer says about the topic.

Be sure to introduce each quotation you use, and always cite your sources. See our handout on quotations for more details on when to quote and how to format quotations.

Like all pieces of evidence, a quotation can t speak for itself. If you end a paragraph with a quotation, that may be a sign that you have neglected to discuss the importance of the quotation in terms of your argument. It s important to avoid plop quotations, that is, quotations that are just dropped into your paper without any introduction, discussion, or follow-up.

Paraphrasing

When you paraphrase, you take a specific section of a text and put it into your own words. Putting it into your own words doesn t mean just changing or rearranging a few of the author s words: to paraphrase well and avoid plagiarism, try setting your source aside and restating the sentence or paragraph you have just read, as though you were describing it to another person. Paraphrasing is different than summary because a paraphrase focuses on a particular, fairly short bit of text like a phrase, sentence, or paragraph. You ll need to indicate when you are paraphrasing someone else s text by citing your source correctly, just as you would with a quotation.

When might you want to paraphrase.

Paraphrase when you want to introduce a writer s position, but his or her original words aren t special enough to quote.

Paraphrase when you are supporting a particular point and need to draw on a certain place in a text that supports your point for example, when one paragraph in a source is especially relevant.

Paraphrase when you want to present a writer s view on a topic that differs from your position or that of another writer; you can then refute writer s specific points in your own words after you paraphrase.

Paraphrase when you want to comment on a particular example that another writer uses.

Paraphrase when you need to present information that s unlikely to be questioned.

Summary

When you summarize, you are offering an overview of an entire text, or at least a lengthy section of a text. Summary is useful when you are providing background information, grounding your own argument, or mentioning a source as a counter-argument. A summary is less nuanced than paraphrased material. It can be the most effective way to incorporate a large number of sources when you don t have a lot of space. When you are summarizing someone else s argument or ideas, be sure this is clear to the reader and cite your source appropriately.

Statistics, data, charts, graphs, photographs, illustrations

Sometimes the best evidence for your argument is a hard fact or visual representation of a fact. This type of evidence can be a solid backbone for your argument, but you still need to create context for your reader and draw the connections you want him or her to make. Remember that statistics, data, charts, graph, photographs, and illustrations are all open to interpretation. Guide the reader through the interpretation process. Again, always, cite the origin of your evidence if you didn t produce the material you are using yourself.

Do I need more evidence.

Let s say that you ve identified some appropriate sources, found some evidence, explained to the reader how it fits into your overall argument, incorporated it into your draft effectively, and cited your sources. How do you tell whether you ve got enough evidence and whether it s working well in the service of a strong argument or analysis. Here are some techniques you can use to review your draft and assess your use of evidence.

Make a reverse outline

A reverse outline is a great technique for helping you see how each paragraph contributes to proving your thesis. When you make a reverse outline, you record the main ideas in each paragraph in a shorter outline-like form so that you can see at a glance what is in your paper. The reverse outline is helpful in at least three ways. First, it lets you see where you have dealt with too many topics in one paragraph in general, you should have one main idea per paragraph. Second, the reverse outline can help you see where you need more evidence to prove your point or more analysis of that evidence. Third, the reverse outline can help you write your topic sentences: once you have decided what you want each paragraph to be about, you can write topic sentences that explain the topics of the paragraphs and state the relationship of each topic to the overall thesis of the paper.

For tips on making a reverse outline, see our handout on organization.

Color code your paper

You will need three highlighters or colored pencils for this exercise. Use one color to highlight general assertions. These will typically be the topic sentences in your paper. Next, use another color to highlight the specific evidence you provide for each assertion including quotations, paraphrased or summarized material, statistics, examples, and your own ideas. Lastly, use another color to highlight analysis of your evidence. Which assertions are key to your overall argument. Which ones are especially contestable. How much evidence do you have for each assertion. How much analysis. In general, you should have at least as much analysis as you do evidence, or your paper runs the risk of being more summary than argument. The more controversial an assertion is, the more evidence you may need to provide in order to persuade your reader.

Play devil s advocate, act like a child, or doubt everything

This technique may be easiest to use with a partner. Ask your friend to take on one of the roles above, then read your paper aloud to him/her. After each section, pause and let your friend interrogate you. If your friend is playing devil s advocate, he or she will always take the opposing viewpoint and force you to keep defending yourself. If your friend is acting like a child, he or she will question every sentence, even seemingly self-explanatory ones. If your friend is a doubter, he or she won t believe anything you say. Justifying your position verbally or explaining yourself will force you to strengthen the evidence in your paper. If you already have enough evidence but haven t connected it clearly enough to your main argument, explaining to your friend how the evidence is relevant or what it proves may help you to do so.

Common questions and additional resources

I think that I m giving evidence, but my instructor says I m using too much summary. How can I tell. Check out our handout on using summary wisely.

I want to use personal experience as evidence, but can I say I. We have a handout on when to use I.

Works consulted

We consulted these works while writing the original version of this handout. This is not a comprehensive list of resources on the handout s topic, and we encourage you to do your own research to find the latest publications on this topic. Please do not use this list as a model for the format of your own reference list, as it may not match the citation style you are using. For guidance on formatting citations, please see the UNC Libraries citation tutorial.

Lunsford, Andrea A., and John J. Ruszkiewicz, John J. Everything s an argument. Boston: Bedford/St. Martin s, 1999

Miller, Richard E., and Kurt Spellmeyer. The New Humanities Reader Home Page. 22 Feb. 2005

This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 2.5 License.

You may reproduce it for non-commercial use if you use the entire handout just click print and attribute the source: The Writing Center, University of North Carolina at Chapel Hill

Download as PDF

If you enjoy using our handouts, we appreciate contributions of acknowledgement.

Fun learning activities for kids. Reading, writing, math, science and more.

How to write, compile, and load plugin driver.

More

The are two distinct type of drivers in Player:

Static drivers have their code in the main Player distribution, and are statically linked into the server. Generally speaking, such drivers will be added by the lead developers.

Plugin drivers are shared objects that are loaded at runtime like loadable modules in the Linux kernel. They are the recommended method for all new, experimental or third party drivers.

Plugin drivers have serveral advantanges over their static counterparts:

They are easier to build no mucking about with CMake, or digging about in the server internals.

They permit rapid development and a much faster code/compile/test cycle the server does not need to be recompiled/relinked when the driver changes.

Code can be maintained in a separate source repository. This is particularly useful for users with funky one-off drivers that belong with the rest of their code, data, papers, etc and not in the Player source tree.

This document describes the process for creating new plugin drivers. It assumes you are familiar with C, class inheritance, and thread programming.

A plugin driver example

Sample code for a very basic plugin driver is provided in the examples directory; for a default install, this will be:

/usr/local/share/player/examples/plugins/exampledriver/

Copy the files from this directory into a new directory somewhere on your disk. Try building the example:

This produces a plugin driver named exampledriver.so. You can test the model using the included configuration file:

The driver block in the config file has an additional field plugin specifying the path to the plugin, i.e.,:

driver

name exampledriver

plugin exampledriver.so

provides position:0

Writing a simple driver

The first step in creating a new driver is to decide which interface it will support. The existing interfaces are described in the Interface specifications section, and their various message structures and constants are defined in player.h. Although you can create a new interface, you should try to fit your driver to an existing interface, of which there are many. By deciding to support an existing interface, you ll have less work to do in the server, and will likely have instant client support for your driver in several languages.

To create a new driver, you should create a new class for the driver, which should inherit from the Driver class. This base class defines a standard API, part of which the new driver must implement other parts it may choose to override. We now describe the salient aspects of the Driver class.

The constructor

Simple drivers will use the following Driver constructor:

Driver::Driver ConfigFile cf, int section, int interface, uint8_t access,

size_t datasize, size_t commandsize,

size_t reqqueuelen, size_t repqueuelen ;

This constructor will establish the buffers and queues that allow the Player server to interface with the driver. The preamble for the example driver, for example, looks like this:

ExampleDriver::ExampleDriver ConfigFile cf, int section

: Driver cf, section, PLAYER_POSITION_CODE, PLAYER_ALL_MODE,

sizeof player_position_data_t, sizeof player_position_cmd_t, 10, 10

The preamble indicates that this driver:

Supports the position interface indicated by PLAYER_POSITION_CODE ;

Allows read/write access from clients PLAYER_ALL_MODE ;

Has a data buffer large enough to accomodate a standard position interface data packet sizeof player_position_data_t ;

Has a command buffer large enough to accomodate a standard position interface command packet sizeof player_position_cmd_t ;

Can queue up to 10 incoming configuration requests and 10 outgoing configuration replies.

The cf and section parameters are passed in by the server; these values to access driver-specific options stored in the Player configuration file. Thus, for example, the driver constructor can read the value of some setting foo :

this- foop cf- ReadInt section, foo, 0 ;

This might be the serial port from which to read data, for example. See the ConfigFile documentation for the various kinds of options that can be read from the configuration file.

MainSetup

When the first client subscribes to a driver, the driver s MainSetup method is called; every driver must implement this method. The Setup method generally does two things:

Do some device-specific initialization e.g., open a serial port.

Start the driver thread using Driver::StartThread.

Player is a multi-threaded application, with most drivers running in their own thread; this makes it particularly easy to write drivers that read/write data from serial ports, network sockets, disk files and so on.

After initialization, MainSetup should return either zero to indicate that the device was successfully setup, or non-zero to indicate that setup failed the latter will cause Player to terminate.

MainQuit

When the last client unsubscribes from a device, the driver s Shutdown method is called; every driver must implement this method. The MainQuit method generally does two things:

Stop the driver thread using Driver::StopThread.

Do some device-specific finalization e.g., close a serial port.

Note that the ordering is important here: we must shut down the driver thread before we release the resources it is using; to this end, Driver::StopThread will tell the driver thread to quit, and wait until it exits before returning.

Shutdown should return either zero to indicate that device was successfully shutdown, or non-zero to indicate that shutdown failed.

Main

The Driver::Startup method will result in the creation of a new thread of control, which will immediately call Driver::Main. Every driver must this overload this method. The overloaded Main method is generally responsible for translating between some device-specific API and the standard Player interfaces. The basic steps are as follows:

For incoming data:

Read data from some external device over a serial port, for example.

Massage the data into one of the Player interface data structures.

Write the data to the Player server using Driver::PutData.

For outgoing data commands :

Read commands from the Player server using Driver::GetCommand.

Massage the command into a device specific format.

Write the command to the external device.

The Driver::PutData and Driver::GetCommand methods manage all of the buffering and locking required to synchronize the driver and server threads.

The overloaded Main method is also responsible for handling any configuration request sent to the driver; the basic steps are as follows:

Check for a new request using Driver::GetConfig.

Do whatever needs to be done for this request.

Send a response using Driver::PutReply.

Note that your driver must respond, one way or another, to each and every request. Failing to respond to requests will cause client programs to hang when talking to the driver.

The overloaded Main must also be capable of graceful termination i.e., the function should exit cleanly when the user kills the server. This can be achieved by calling pthread_testcancel from within the main loop. This function checks to see if the driver thread should terminate, and if so, immediately exits Main. If additional cleanup is required, drivers can also overload Driver::MainQuit, which is guaranteed to be called on thread termination.

Instantiation

In order to instantiate a driver, the Player server needs to know two things:

The driver s name as it will appear in the configuration file.

The driver s factory function used to create a new instance of the driver. The factory function will generally look something like this:

Driver ExampleDriver_Init ConfigFile cf, int section

return Driver new ExampleDriver cf, section ;

Note that this function may be called multiple times: once for each occurance of the driver name in the configuration file.

Each driver must register itself with the server using the DriverTable::AddDriver, providing the driver name and factory function. Drivers must therefore define a registration function as follows:

void ExampleDriver_Register DriverTable table

table- AddDriver exampledriver, ExampleDriver_Init ;

This function must be called exactly once, on program startup. For plugin drivers, this can be achieved by defining an initialization function for the shared object:

extern C

int player_driver_init DriverTable table

ExampleDriver_Register table ;

return 0;

This function will be called when the shared object is loaded, before any drivers are instantiated. The extern C block is used to prevent C name mangling of the intialization function.

Building the shared library

The example driver includes a CMakeLists.txt file set up for building the driver s shared objects. The process for building a plugin driver with CMake is very much like the process for building and installing Player. From within your source directory, try:

mkdir build

cd build

cmake. .

make

The build directory should now contain exampledriver.so built from the C source. Note that if your plugin driver file is in a separate directory than your Player configuration file, you may have to edit the config file to reflect the path to the plugin.

CMake is the preferred method for building Player plugins, but plugin drivers are also easy to build manually from the command line. To skip the CMake steps and manually build a shared object, try:

g -Wall -g3 -c exampledriver.cc

g -shared -nostartfiles -o exampledriver.so exampledriver.o

While the above method will probably work, it is recommended that you use pkg-config to get the compile flags; i.e.,

g -Wall -g3 pkg-config --cflags player -c exampledriver.cc

Todo:

- Add example of building plugin using libtool.

Add theory from Architecture Chapter of the old manual.

Mobile. Audio. Clever stuff. Gadget Writing covers the latest technology but with a difference. Reviews are typically in-depth, exploring details you may not find.

writing player driver writing player driver