473,394 Members | 1,841 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Advice on Project

Hello,
This isn't exactly a C programming question, but i figured experienced
C programmers would offer the best response.
My boss wants a program developed that reads from ANY
device(peripheral) over a serial/usb/tin can/etc. connection. I've
tried convincing him it needs to be more specific (develop a driver
for ONE device and go from there) but to no avail, I would like
somebody else's professional opinion of why this is not attainable, or
just comments/convincing arguments.
Thank You
Nov 14 '05 #1
11 1398

"Milton" <fo*******@hotmail.com> wrote

This isn't exactly a C programming question, but i figured experienced
C programmers would offer the best response.
My boss wants a program developed that reads from ANY
device(peripheral) over a serial/usb/tin can/etc. connection. I've
tried convincing him it needs to be more specific (develop a driver
for ONE device and go from there) but to no avail, I would like
somebody else's professional opinion of why this is not attainable, or
just comments/convincing arguments.

This question is very platform-specific. If your platform abstracts devices,
let's say handles them as files, then you can write a program that can read
from any device. However this may not be too useful, for instance a video
camera will give a huge amount of data that is inherently two dimensional, a
morse key will just give a trickle of data that is essentially analogue,
though digitised for the computer. You can dump the data in hex format to
the screen, but actually writing one routine that will do something useful
with these two sources is very tricky.

If the platform doesn't abstract devices, the you will need a separate
interface to each one. Since the program must handle any device, you will
need facilities for loading a video device driver for the video camera, a
morse driver for the morse code key, and so on. This is not inherently
impossible (operating systems do just that) but it is a very tricky bit of
programming requiring deep knowledge of the platform internals.
Nov 14 '05 #2
kal
fo*******@hotmail.com (Milton) wrote in message news:<9d**************************@posting.google. com>...
Hello,
This isn't exactly a C programming question, but i figured experienced
C programmers would offer the best response.
My boss wants a program developed that reads from ANY
device(peripheral) over a serial/usb/tin can/etc. connection. I've
tried convincing him it needs to be more specific (develop a driver
for ONE device and go from there) but to no avail, I would like
somebody else's professional opinion of why this is not attainable, or
just comments/convincing arguments.
Thank You


You are paraphrasing what your boss told you. you have omitted
substantial but relevant details of the problem at hand.

The program given below reads from ANY peripheral device.
In fact it reads from ALL the devices. It also reads from
devices attached to other computers within a hundred yards.

#include <assert.h>
#include <complex.h>
#include <ctype.h>
#include <errno.h>
#include <fenv.h>
#include <float.h>
#include <inttypes.h>
#include <iso646.h>
#include <limits.h>
#include <locale.h>
#include <math.h>
#include <setjmp.h>
#include <signal.h>
#include <stdarg.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <tgmath.h>
#include <time.h>
#include <wchar.h>
#include <wctype.h>

int main(){for(;;)fgetc(stdin);return 0;}
Nov 14 '05 #3
kal wrote:
.... snip ...
The program given below reads from ANY peripheral device.
In fact it reads from ALL the devices. It also reads from
devices attached to other computers within a hundred yards.


.... snip foolish code ...

Don't give such silly advice without clearly indicating it is
meant in jest. Some dewey eyed newbie might take you seriously.

--
Chuck F (cb********@yahoo.com) (cb********@worldnet.att.net)
Available for consulting/temporary embedded and systems.
<http://cbfalconer.home.att.net> USE worldnet address!
Nov 14 '05 #4

"kal" <k_*****@yahoo.com> wrote in message
news:a5**************************@posting.google.c om...
fo*******@hotmail.com (Milton) wrote in message

news:<9d**************************@posting.google. com>...
Hello,
This isn't exactly a C programming question, but i figured experienced
C programmers would offer the best response.
My boss wants a program developed that reads from ANY
device(peripheral) over a serial/usb/tin can/etc. connection. I've
tried convincing him it needs to be more specific (develop a driver
for ONE device and go from there) but to no avail, I would like
somebody else's professional opinion of why this is not attainable, or
just comments/convincing arguments.
Thank You


You are paraphrasing what your boss told you. you have omitted
substantial but relevant details of the problem at hand.

The program given below reads from ANY peripheral device.
In fact it reads from ALL the devices. It also reads from
devices attached to other computers within a hundred yards.

#include <assert.h>
#include <complex.h>
#include <ctype.h>
#include <errno.h>
#include <fenv.h>
#include <float.h>
#include <inttypes.h>
#include <iso646.h>
#include <limits.h>
#include <locale.h>
#include <math.h>
#include <setjmp.h>
#include <signal.h>
#include <stdarg.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <tgmath.h>
#include <time.h>
#include <wchar.h>
#include <wctype.h>

int main(){for(;;)fgetc(stdin);return 0;}


Any??????????????????????????????????.
Arse-hole.
--
Imanpreet Singh Arora
If I would have only known, I would have been a locksmith.
-- Albert Einstein


Nov 14 '05 #5

"Milton" <fo*******@hotmail.com> wrote in message
news:9d**************************@posting.google.c om...
Hello,
This isn't exactly a C programming question, but i figured experienced
C programmers would offer the best response.
My boss wants a program developed that reads from ANY
device(peripheral) over a serial/usb/tin can/etc. connection. I've
tried convincing him it needs to be more specific (develop a driver
for ONE device and go from there) but to no avail, I would like
somebody else's professional opinion of why this is not attainable, or
just comments/convincing arguments.
Thank You


Like someone else has also stated this this quite a OS dependent question. I
ain't sure how you can do it in Windows. But on Linux/Unix(1) you may just
take the device as an argument and read from it just like any other file.
(1) Does Unix also has the same concept of /dev/XXXX?

--
Imanpreet Singh Arora
If I would have only known, I would have been a locksmith.
-- Albert Einstein


Nov 14 '05 #6
Imanpreet Singh Arora wrote:
"Milton" <fo*******@hotmail.com> wrote in message
news:9d**************************@posting.google.c om...
[redacted] Like someone else has also stated this this quite a OS dependent question. I
ain't sure how you can do it in Windows. But on Linux/Unix(1) you may just
take the device as an argument and read from it just like any other file.
(1) Does Unix also has the same concept of /dev/XXXX?


Where do you think Linux got the concept of /dev/XXXX from?

Nov 14 '05 #7
On 18 Aug 2004 09:41:03 -0700, fo*******@hotmail.com (Milton) wrote:
Hello,
This isn't exactly a C programming question, but i figured experienced
C programmers would offer the best response.
My boss wants a program developed that reads from ANY
device(peripheral) over a serial/usb/tin can/etc. connection. I've
tried convincing him it needs to be more specific (develop a driver
for ONE device and go from there) but to no avail, I would like
somebody else's professional opinion of why this is not attainable, or
just comments/convincing arguments.
Thank You

This is what the OS is doing, so the "program" your boss wants
developed already exists on most platforms - it is the device handling
part of the OS. And the OS typically won't let you run a program that
reads from devices - you will need to use some kind of interface to
the device, provided by the OS.

Of course the OS will let you write and run your own device driver
instead of the one the manufacturer of the device provides - but why
would you want to do that? It has nothing to do with the original
task.

Another thought: ... reads from ANY device ... and what DOES it with
all that data? Pass it over to client programs that KNOW something
about that data? Well... looks like you're going to write a new OS for
your boss :)
Nov 14 '05 #8
Mac
On Wed, 18 Aug 2004 09:41:03 -0700, Milton wrote:
Hello,
This isn't exactly a C programming question, but i figured experienced
C programmers would offer the best response.
My boss wants a program developed that reads from ANY
device(peripheral) over a serial/usb/tin can/etc. connection. I've
tried convincing him it needs to be more specific (develop a driver
for ONE device and go from there) but to no avail, I would like
somebody else's professional opinion of why this is not attainable, or
just comments/convincing arguments.
Thank You


Are you sure you're not just trolling? This sounds like some kind of joke.

What you have outlined is far too vague to be called a project. It isn't
even a concept. It is a sketch of a concept. Not only that, but you will
most likely be re-inventing the wheel since device drivers probably
already exist which do this for any device where the idea makes sense.

Anyway, I suggest that you tell your boss that you like his idea and are
going to write up a detailed engineering specification for it. If he
agrees, then write it up as you see fit, and give it to him. Make sure you
spell out exactly what your code will and will not be able to do so that
you don't create expectations that can't be filled. You might want to
estimate the time for various parts of the project and identify the major
risks that you see. Explain how you will make it easy to add new devices
and you will start by reading from a file. After the file reading code is
debugged, you will add support for other devices one at a time. But this
will be easy because of the modular way you wrote the code in the first
place.

If he won't let you write up the specification or if he can't be bothered
to read it but still wants you to do the project, I suggest you find a way
for someone else to be your boss. (New manager at same company, or new
company.)

Good luck.

--Mac

Nov 14 '05 #9
Mac <fo*@bar.net> wrote in message news:<pa***************************@bar.net>...
Are you sure you're not just trolling? This sounds like some kind of joke.

Sadly, no. This is a true story.
What you have outlined is far too vague to be called a project. It isn't
even a concept. It is a sketch of a concept. Not only that, but you will
most likely be re-inventing the wheel since device drivers probably
already exist which do this for any device where the idea makes sense.
Yeah, the drivers were one of the annoying parts. There was also
"Installing needed programs without user interaction" and "Installing
drivers through a website" /issues/.

Anyway, I suggest that you tell your boss that you like his idea and are
going to write up a detailed engineering specification for it. If he
agrees, then write it up as you see fit, and give it to him. Make sure you
spell out exactly what your code will and will not be able to do so that
you don't create expectations that can't be filled. You might want to
estimate the time for various parts of the project and identify the major
risks that you see. Explain how you will make it easy to add new devices
and you will start by reading from a file. After the file reading code is
debugged, you will add support for other devices one at a time. But this
will be easy because of the modular way you wrote the code in the first
place.


We had a meeting yesterday. It was about 2 hours long, and his
various toys that he wanted to make became some Rube Goldberg machine
involving a torn apart mouse and spinning wheels and levers assembled
in the lunch room. I think the project is dead now.
Nov 14 '05 #10
red floyd wrote:
Imanpreet Singh Arora wrote:
"Milton" <fo*******@hotmail.com> wrote in message
news:9d**************************@posting.google.c om...
[redacted]


Like someone else has also stated this this quite a OS dependent
question. I
ain't sure how you can do it in Windows. But on Linux/Unix(1) you may
just
take the device as an argument and read from it just like any other file.
(1) Does Unix also has the same concept of /dev/XXXX?


Where do you think Linux got the concept of /dev/XXXX from?


(S)he doesn't know, and that's why (s)he asked.

Thanks,
--GS

Nov 14 '05 #11

"Imanpreet Singh Arora" <ma*********@msn.com> wrote
The program given below reads from ANY peripheral device.
In fact it reads from ALL the devices. It also reads from
devices attached to other computers within a hundred yards.

#include <assert.h>
#include <complex.h>
#include <ctype.h>
#include <errno.h>
#include <fenv.h>
#include <float.h>
#include <inttypes.h>
#include <iso646.h>
#include <limits.h>
#include <locale.h>
#include <math.h>
#include <setjmp.h>
#include <signal.h>
#include <stdarg.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <tgmath.h>
#include <time.h>
#include <wchar.h>
#include <wctype.h>

int main(){for(;;)fgetc(stdin);return 0;}


Any??????????????????????????????????.
Arse-hole.

The prgram will read from any device that the platform allows to be attached
to stdin. For the average user this is just the keyboard, but most platforms
will allow advanced users to set up other devices as virtual keyboards.
Nov 14 '05 #12

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

75
by: Howard Nease | last post by:
Hello, everyone. I would appreciate any advice that someone could give me on my future career path. Here is my situation: I am a bright Junior in a very well-respected private high school, taking...
9
by: Rick Muller | last post by:
I have a problem that I would like to get some advice on from other Pythonistas. I currently manage a (soon to be) open source project for displaying molecular graphics for a variety of different...
4
by: Socheat Sou | last post by:
After a brief, but informative, discussion on Freenode's #zope chatroom, I was advised to consult the gurus on c.l.p. I'm working for a small company who is in desperate need to rewrite it's...
2
by: Andrew | last post by:
I am starting my first C# project and have a design issue which I would appreciate some advice about. I am wondering whether to use dataset to pass information between components or if I should...
11
by: Mark | last post by:
Hi, For the last 2 years I've been developing vehicle tracking/telemetric software for a company as a self employed individual. The project is quiet big, and is going to be there flagship...
9
by: Laban | last post by:
Hi, I find myself using static methods more than I probably should, so I am looking for some advice on a better approach. For example, I am writing an app that involves quite a bit of database...
8
by: shuisheng | last post by:
Dear All, We meet some problem in our project development and sincerely ask for your kind advice. We took eight months to develop a project system with about 50,000 lines of code. The code is...
9
by: Duncan Smith | last post by:
Hello, I find myself in the, for me, unusual (and at the moment unique) position of having to write a web application. I have quite a lot of existing Python code that will form part of the...
7
by: Gladen Blackshield | last post by:
Hello All! Still very new to PHP and I was wondering about the easiest and simplest way to go about doing something for a project I am working on. I would simply like advice on what I'm asking...
3
by: MIUSS | last post by:
Hi! I am modifying some part of source code and I now I am suspended by one thing I really don't understand and I got no one experience with it. I got fully working source code (it reports no...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.