Namespaces
Variants
Actions

Archived:Redirecting stdin and stdout streams in Open C

Jump to: navigation, search
Archived.png
Archived: This article is archived because it is not considered relevant for third-party developers creating commercial solutions today. If you think this article is still relevant, let us know by adding the template {{ReviewForRemovalFromArchive|user=~~~~|write your reason here}}.

Article Metadata

Compatibility
Platform(s): S60 3rd Edition
S60 3rd Edition, FP1 and FP2

Article
Created: User:Technical writer 1 (12 Jun 2008)
Last edited: hamishwillee (14 Sep 2012)

Description

By installing the optional stdioserver.sis package from Open C deliverables, a console for debugging purposes will be created. By default, stdout will be directed to this console and stdin will also take its input from it.

It is possible to configure the redirection of these standard streams by modifying the stdioserver's config.ini file.

Solution

config.ini is installed as part of the stdioserver.sis package.

In the emulator, it is installed in \epoc32\winscw\c\system\data.
In the device, it is installed in c:\system\data.


A sample config.ini is shown below. Here, stdin input is taken from a console and stdout is redirected to a serial port. The file also contains sections for input from a file [MEDIA1] and output to a file [MEDIA4], although they are not used in this case.

 [STDIO]
 STDIN = MEDIA3
 STDOUT = MEDIA2
 
 [MEDIA1]	
 type = file
 path = C:\system\data\in.txt
 max size = 100
 
 [MEDIA2]
 type = serial
 baud = 214
 port = COMM::10
 
 [MEDIA3]
 type = console
 width = -1
 height = -1
 
 [MEDIA4]
 type = file
 path = c:\system\data\out.txt
 max size = 1000
This page was last modified on 14 September 2012, at 03:22.
266 page views in the last 30 days.
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved