|
What I understood from the original post was, the total amount of data received is 3MB every second, and is not received at a shot, but is received in 100 intervals.
Nobody can give you wiser advice than yourself. - Cicero
|
|
|
|
|
A standard hard drive maximum write speed is theoretically 12.5 MBs per second (Megabytes, not Megabits) if I remember correctly.
Even if you had a 15,000 RPM SATA, SAS, or SCSI you probably won't see over 20-30 MB/s.
You will need to have a RAID 5 or better of at least 10 high-performance drives to handle all this data, but even that would probably barely do it.
The other option is to install GBs upon GBs of RAM and just Queue it all up like you've been doing. You're not going to get 1-2 hours of data, though, at all on your current setup. You'll have to read for 5 minutes, wait until the Queue is empty, and then collect more data.
That's the only solution I can think of, and it's merely a money issue. Fast storage is expensive.
|
|
|
|
|
I cannot understand what the problem is with this code and why I get this error:
error C2621: union 'EntryInfoUnion' : member 'strInfoStruct' has copy constructor
struct floatInfoStruct
{
float min;
float max;
float* result;
float test;
};
struct intInfoStruct
{
int min;
int max;
int* result;
int test;
};
struct timeInfoStruct
{
SECONDS min;
SECONDS max;
SECONDS *result;
TimeFormats Format;
SECONDS test;
};
struct angleInfoStruct
{
DEGREES *result;
DEGREES test;
};
struct latlonInfoStruct
{
LAT_DEGREES *lat_result;
LON_DEGREES *lon_result;
LAT_DEGREES lat_test;
LON_DEGREES lon_test;
};
struct baroInfoStruct
{
float min;
float max;
float *result;
float test;
};
struct strInfoStruct
{
CString min;
CString max;
CString *result;
CString test;
};
union EntryInfoUnion
{
floatInfoStruct floatInfo;
intInfoStruct intInfo;
timeInfoStruct timeInfo;
angleInfoStruct angleInfo;
latlonInfoStruct latlonInfo;
baroInfoStruct baroInfo;
strInfoStruct strInfo;
};
What does the error message (union 'EntryInfoUnion' : member 'strInfoStruct' has copy constructor) trying to tell me.
I just don't see the problem with the code snippet.
Thanks.
John P.
|
|
|
|
|
jparken wrote: union EntryInfoUnion
{
...
strInfoStruct strInfo;
};
Union members are not allowed to have (copy) constructors.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
David, maybe I can't see the forest for the trees. What is the difference between, say, "floatInfoStruct floatInfo;", and "strInfoStruct strInfo;" being part of the union and causing the 'copy constructor' error?
Can you explain this in more detail, please?
Thank you.
John P.
|
|
|
|
|
In other words you can not use a CString in a union since they have copy constructors in them. Try just using a char[] instead.
|
|
|
|
|
Dustin --- thanks for the response. I just now saw the forest for the trees as you were answering. Sometimes the obvious is too obvious --- like hiding in plain sight.
Thanks again.
John P.
|
|
|
|
|
I'm currently working on a program that was orginall written in VC6, I ported it to VS2K3 and got all of the features to work. Now I'm trying to get it compile in VS2k5 and have done so but I keep getting this strange error.
I have a edit box and a slider box, either one can be used, to enter a floating value between 0 and 1. When you try to select either a message pops up saying "Please enter a value between 0 and 1000" and you are not able to change any values before this message pops up, and then a debug assertion error is given.
I have checked over all the math and it remains the same as the VC++6.0 and VS2003 that both work, and the only part of the code that was changed was when some pow() functions where used to solve and problem with ambiguity.
Any ideas on how to fix this or and idea of where I should be looking to resolve this problem
Thanks
Simon
|
|
|
|
|
simoncoul wrote: message pops up saying "Please enter a value between 0 and 1000"
Sounds like a DDV_* function, check out the DoDataExchange() function.
simoncoul wrote: and then a debug assertion error is given
That assertion will tell you exactly what is wrong. Use the debugger and look at the call stack to find the point in your code where the error is.
You may be right
I may be crazy
-- Billy Joel --
Within you lies the power for good - Use it!
|
|
|
|
|
Thank you very much for the quick response! These are the values that I have for my DDV & DDX
DDV_MinMaxFloat(pDX, m_dradix, 0.f, 1000.f);
DDX_Text(pDX, IDC_EDITX, m_editx);
DDV_MinMaxFloat(pDX, m_editx, 0.f, 1.f);
DDX_Text(pDX, IDC_EDITY, m_edity);
DDV_MinMaxFloat(pDX, m_edity, 0.f, 1.f);
DDX_Text(pDX, IDC_EDITL, m_editl);
I checked out the assertion and it points me to this:
void CLayerDlg::OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar)
{
switch(pScrollBar->GetDlgCtrlID() ){
case IDC_SLIDERL:
if (m_sliderl == nPos)
break;
UpdateData(CTRL2VAR);
if (m_sliderl < SLIDERLMIN)
m_sliderl = SLIDERLMIN;
m_editl = (float)m_sliderl*5.0;
UpdateData(VAR2CTRL);
break;
case IDC_SLIDERX:
if (m_sliderx == nPos)
break;
UpdateData(CTRL2VAR);
****** m_editx = (float)m_sliderx/100.0;
UpdateData(VAR2CTRL);
break;
case IDC_SLIDERY:
if (m_slidery == nPos)
break;
UpdateData(CTRL2VAR);
****** m_edity = (float)m_slidery/100.0;
UpdateData(VAR2CTRL);
break;
}
CDialog::OnHScroll(nSBCode, nPos, pScrollBar);
}
At the point where I put the stars is where the assertion points me to. I think that my problem is the variable "m_dradix" from above as the values of m_editx and m_edity into a function that uses this variable. Is there are way I can track this variable through out the whole process to see what happens to it's value, I cannot figure out how to do it in 2k5?
Thanks again
Simon
|
|
|
|
|
Using UpdateData() with data validators isn't going to work unless you ensure the controls
and their corresponding data member variables contain valid values.
It may be best to update the relevent controls directly during a slider scroll instead of
relying on DDX to do it.
An explanation of some pifalls with UpdateData can be found in this essay:
Joseph Newcomer: Avoiding UpdateData[^]
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
I'm sure that it is not the UpdateData that is causing the problem, something has changed in that way it is handling the math, does anyone know of a page that talks about how the math functions have changed from 2003 to 2005?
Thanks
|
|
|
|
|
simoncoul wrote: I'm sure that it is not the UpdateData that is causing the problem
OK but you said the message box was looking for a number between 0 and 1000.
You showed a validator on m_dradix - DDV_MinMaxFloat(pDX, m_dradix, 0.f, 1000.f);
What is the value of m_dradix at the time of the scroll message?
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
Thank you very much everyone I have found my problem. I piece of the code was passing a zero into a log base 10, resulting is crazy numbers. I just don't understand why VC6 and VS2003 did not pick this up as an error?
|
|
|
|
|
Hi folks,
Got a Q re updating text on a status bar after changing focus from an application. I have a program I wrote that updates a database and shows the numbers of records processed on the status bar. When I change focus from that program the counter stops and when I subsequently go back to it, the numbers of recds processes stay frozen. What can I do to update the status bar once the program regains focus? Thx,
Ralf.
ralf.riedel@usm.edu
|
|
|
|
|
are you using MFC and UpdateCmd mechanism?
led mike
|
|
|
|
|
Using MFC and in CMainFrame() I have the following code. That's all I have for code handling the status bar.
void CMainFrame::UpdateStatus(UINT nPane, CString str) {
this->m_wndStatusBar.SetPaneText(nPane, str);
}
ralf.riedel@usm.edu
|
|
|
|
|
You should do some reading about the MFC macro ON_UPDATE_COMMAND_UI and associated framework implementation.
led mike
|
|
|
|
|
hi i have to change the dialog background color at runtime frequently. how to do this
|
|
|
|
|
* Handle WM_CTLCOLOR (handler OnCtlColor)
* prepare a HBRUSH (CreateSoldBrush or so)
* return that brush from the handler (also use CDC::SetBkMode(TRANSPARENT) if needed)
--
=====
Arman
|
|
|
|
|
prathuraj wrote: change the dialog background color at runtime
On the WM_CTLCOLOR you need when want to use SetBkColor(); use of a global variable(COLORREF).
|
|
|
|
|
I currently get a C++ compiler error 32385:
Ambiguous access of CreateNewThread in 'mainloop'
Now, The cause of this is because the mainloop class inherits,
ClxThread object, and Poll_LenzeInvertors object. The Poll_LenzesInvertors objects also inherits ClxThread object. The ClxThread object has a function called CreateNewThread() that spinns a thread of virtual function called ThreadFunc(). I used the ClxThread to create OO way to create threads. Howver, this seems to be the problem with multiple inheritenace.
I would like to find a solution to this problem and still be capable of using my ClxThread Object. Any advise would be helpful.
Is there a way to distrigish which base class you are trying to call?
Should i just rewrite ClxThread so, it does not have to be inherited to work...
Scott
Scott Dolan
Jernie Corporation
Engineering & Manufacturing
Software, Hardware, & Enclosures
|
|
|
|
|
ScotDolan wrote: I currently get a C++ compiler error 32385:
C2385 perhaps?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
yes, My mistake on the error number.
Scott Dolan
Jernie Corporation
Engineering & Manufacturing
Software, Hardware, & Enclosures
|
|
|
|
|
Try overloading CreateNewThread() in your derived class. There you can now call ClxThread::CreateNewThread() or Poll_LenzesInvertors::CreateNewThread() - whatever your logic requires.
Failure is not an option - it's built right in.
|
|
|
|