Search found 25 matches

by exosyst
Fri Oct 24, 2008 9:43 pm
Forum: The Code Dump
Topic: Signal Visualizer
Replies: 6
Views: 4715

Hmm, The main.c is pretty awful and was just an example. You can strip out the PI identifier and the other bits of junk left over from testing. See if that works. The only point of that example was just to show that it connects to the running server and generates a graph, the API is really basic (aw...
by exosyst
Fri Oct 24, 2008 9:30 pm
Forum: The Code Dump
Topic: Signal Visualizer
Replies: 6
Views: 4715

Here're some screenshots, I haven't tried building this project with later versions of Ubuntu, infact I haven't touched it since I completed it as part of my final university project. Attached are some pics, when I got on my Linux box I will see what if anything has changed.
by exosyst
Fri Jun 06, 2008 2:12 pm
Forum: The Code Dump
Topic: Signal Visualizer
Replies: 6
Views: 4715

Signal Visualizer

Hey guys - I wrote a signal visualizer tool for my final year project at uni. It has network comms, 2D graphics stuff and some other odds and ends I posted a few times asking for help and it was greatly received so thought i'd return the favour and dump this code with you. Apologies if it's not the ...
by exosyst
Mon Mar 31, 2008 5:19 pm
Forum: C++ Development
Topic: wxSocketBase::SetEventHandler causing exception error
Replies: 3
Views: 1164

tan wrote:Hi,

why do you call SetNotify() after Destroy()?
Thanks tan - that got put in when testing different things and I guess i solved one problem but created another trickier one!
by exosyst
Sun Mar 30, 2008 9:05 pm
Forum: C++ Development
Topic: wxSocketBase::SetEventHandler causing exception error
Replies: 3
Views: 1164

Is it related to this does anyone know? http://forums.wxwidgets.org/viewtopic.p ... tforaccept

Any suggestions on a fix?
by exosyst
Sun Mar 30, 2008 6:36 pm
Forum: C++ Development
Topic: wxSocketBase::SetEventHandler causing exception error
Replies: 3
Views: 1164

wxSocketBase::SetEventHandler causing exception error

void MyFrame::OnServerStart() { wxIPV4address addr; addr.Service(SERVER_PORT_NO); //Create socket and give handle m_server = new wxSocketServer(addr); if (! m_server->Ok()) //Check if the server is broken :( { myText->AppendText(wxT("Unable to claim port - please free the port and try again\n&...
by exosyst
Wed Feb 06, 2008 1:07 am
Forum: C++ Development
Topic: Colour blending
Replies: 2
Views: 948

I did myself - I don't suppose it's a very common issue/idea but what follows is my rather unclean implementation. The idea is that it returns a pointer to the array of colours (easiest method for me). It takes 5 colours and blends them in a fairly rudimentary manner. it uses 1000 to represent 100% ...
by exosyst
Tue Feb 05, 2008 3:11 pm
Forum: C++ Development
Topic: using 1/2 (half of one) as a character?
Replies: 3
Views: 943

Re: using 1/2 (half of one) as a character?

MoonKid wrote: Especialy I need to draw ages of childs like this:
1 years and 3/12
3 years and 8/12

Is this possible or do I need to draw this myself?
If you're not doing something smart like
2 years and a 1/4
5 years and a 1/3

then why not just use:
1 year and 3 months?
2 years and 1 month?
by exosyst
Tue Feb 05, 2008 3:05 pm
Forum: C++ Development
Topic: Colour blending
Replies: 2
Views: 948

Colour blending

I'm developing some code for a spectrogram/graph and am curious if anyone has any ideas for a part of the implementation. I need to have a chart that merges between: Black->Blue->Red->Yellow->White Ideally i'd like to have something like: const wxColour getColour(int percentage); where the colours a...
by exosyst
Wed Jan 23, 2008 11:26 am
Forum: C++ Development
Topic: Socket Question
Replies: 7
Views: 1343

For your application you may want to specify the flags for the socket

http://www.wxwidgets.org/manuals/stable ... sesetflags has more information.
by exosyst
Mon Jan 21, 2008 3:05 pm
Forum: C++ Development
Topic: wxSocket going down at recieving string
Replies: 11
Views: 2083

buf = new wxChar[MAXSEND] sock->Read(buf,MAXSEND); m_text->AppendText(buf); I think what tan was getting at is that you need to terminate your string. sock->Read(..) will change the value of wxSocketBase::LastCount. If you haven't read enough data to fill your entire buffer you'll end up with junk ...
by exosyst
Mon Jan 21, 2008 10:16 am
Forum: C++ Development
Topic: save textctrl value
Replies: 4
Views: 1298

Can you not just store the contents in a string? wxTextCtrl *myText = new wxTextCtrl; wxString dataContents; //do loads of stuff and then when you hide the box just dataContents = myText->GetValue(); //And when you show it again myText->Append(dataContents); I'm sure there're better ways but I'm not...
by exosyst
Mon Jan 21, 2008 10:02 am
Forum: C++ Development
Topic: Trouble with Threads
Replies: 4
Views: 1444

Fixed it by taking out the thread stuff. Things seem to get 'gunked' up on the server side of things and it ends up broken so it's single-threaded and event based only now. Shame as would've liked to have kept the thread stuff going :D
by exosyst
Mon Jan 21, 2008 10:00 am
Forum: C++ Development
Topic: wxSocket going down at recieving string
Replies: 11
Views: 2083

Yeah it seems you haven't reserved enough space for your null character

More info on how strings are stored here.

I'd recommend staying with wxSockets on both client & server btw. I've had pain intermixing them - especially with winsock not tearing connections down as I expected.
by exosyst
Mon Jan 21, 2008 9:55 am
Forum: C++ Development
Topic: How do wxSocketStreams work
Replies: 2
Views: 827

//Socket and string streams #include "wx/sckstrm.h" #include "wx/sstream.h" ... //Other code to setup socket server and events etc ... //Code to catch socket event (e.g) 'case WXSOCKET_INPUT' and //wxSocketBase *mySock = event.GetSocket(); //get socket handle //Create string to ...