Search the web
Sign In
New User? Sign Up
AgileEmbedded · Agile Embedded
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Want your group to be featured on the Yahoo! Groups website? Add a group photo to Flickr.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Lacking MCH Fundamentals   Message List  
Reply | Forward Message #411 of 435 |
So I'm playing with the Model Conductor Hardware architecture. I'm
sure there's merit to this architecture but I'm still trying to grasp
it. I've read "Mocking the Embedded World" four times.

For simplicity sake, let's say I have two triads:
- "Display" which is is a LED array controlled by a MAX265 (programmed via SPI)
- "UART" which is connected up to various devices, including the LED array.

Currently I've got something like this (from the top of my head):

DisplayConductor.c
void DisplayConductor_Init(void) {
DisplayHardware_Init();
DisplayHardware_StartupTest();
}

void DisplayConductor_Run(void) {
// Somehow receive message to display something
}

DisplayHardware.c
void DisplayHardware_Init(void) {
.. do some direction and output port setup ..
}

void DisplayHardware_StartupTest(void) {
// CS port set low
// Somehow send data word to UART?
// CS port set high
// CS port set low
}

void DisplayModel.c
// What goes here???

UartConductor.c
void UartConductor_Init(void) {
UartHardware_SetupPorts();
}

UartHardware.c
void UartHardware_Init(void) {
UartHardware_SetupPorts();
}

void UartHardware_SendSPIData(address, data) {
// Put it on the line etc.
}


So if you quickly read through the above pseudo code you'll see a
couple of issues that I'm not sure how it all fits together:

1. Message passing between triads - Why go through the models? How
would a Hardware part talk to another triad? How can
DisplayHardware_StartupTest know when the UART has sent the data so it
can finish with the Chip Select toggle?
2. What goes in the model? The pdf says the logic, does this mean
like the statefull part of the device? I'd like to see how this
works.

So I'm trying not to get overwhelmed as I'm sure lots of people have
thought long and hard about this architecture. Any help appreciated.

Sorry about the post. Hope it's not confusing and helps someone else,
Jevin



Fri Jul 3, 2009 6:38 pm

jmaltais36
Offline Offline
Send Email Send Email

Forward
Message #411 of 435 |
Expand Messages Author Sort by Date

So I'm playing with the Model Conductor Hardware architecture. I'm sure there's merit to this architecture but I'm still trying to grasp it. I've read...
Jevin Maltais
jmaltais36
Offline Send Email
Jul 3, 2009
6:39 pm

Hello Jevin The Model's place in the architecture is to contain the core application logic of the system. Imagine the part of the system that is independent...
James Grenning
jwgrenning
Offline Send Email
Jul 7, 2009
3:09 am

Thanks for the reply James, ... Gotcha ... Your example really helps. One thing you didn't describe is how the triads actually call or pass messages to each...
Jevin Maltais
jmaltais36
Offline Send Email
Jul 7, 2009
2:10 pm

Jevin, I'm still working on a more detailed post to your primary inquiry, but James is definitely on track. MCH came more from MVP (Model-View-Presenter) and...
Greg Williams
willi297
Offline Send Email
Jul 7, 2009
2:49 pm

Jevin An RTOS is not needed for MCH. The idea of the pattern is to separate different interests (app from hardware). The interaction can be as simple as a...
James Grenning
jwgrenning
Offline Send Email
Jul 7, 2009
5:08 pm

... I believe what your really asking is how the MODELs communicate between each other. They use another conductor. So the messages don't go from just HW->C->M...
Joseph Gutierrez
gutzofter
Offline Send Email
Jul 8, 2009
4:24 pm

Good discussion on MCH, guys. I've been using MCH for the past couple of years on a couple big projects, and thought I would share what I've learned so far....
Mark Vander Voord
mvandervoord
Offline Send Email
Jul 8, 2009
6:35 pm

Awesome awesome! I thought I was an MCH heathen for considering a MH pattern before. This was a well needed discussion thanks for the half hour+ you spent on...
Jevin Maltais
jmaltais36
Offline Send Email
Jul 11, 2009
3:52 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help