equal
deleted
inserted
replaced
35 #define KDummySCPRTag KESockConnectionTag |
35 #define KDummySCPRTag KESockConnectionTag |
36 #endif |
36 #endif |
37 |
37 |
38 using namespace ESock; |
38 using namespace ESock; |
39 using namespace MeshMachine; |
39 using namespace MeshMachine; |
40 |
|
41 //We reserve space for two preallocated activities that may start concurrently on the SCPR |
|
42 //node: destroy and data client stop. |
|
43 static const TUint KDefaultMaxPreallocatedActivityCount = 2; |
|
44 static const TUint KMaxPreallocatedActivitySize = sizeof(MeshMachine::CNodeRetryParallelActivity) + sizeof(MeshMachine::APreallocatedOriginators<4>); |
|
45 static const TUint KDummySCPRPreallocatedActivityBufferSize = KDefaultMaxPreallocatedActivityCount * KMaxPreallocatedActivitySize; |
|
46 |
40 |
47 namespace DummySCPRStates |
41 namespace DummySCPRStates |
48 { |
42 { |
49 DEFINE_SMELEMENT(TRaiseGranted, NetStateMachine::MStateTransition, DummySCPRStates::TContext) |
43 DEFINE_SMELEMENT(TRaiseGranted, NetStateMachine::MStateTransition, DummySCPRStates::TContext) |
50 void TRaiseGranted::DoL() |
44 void TRaiseGranted::DoL() |
229 |
223 |
230 CDummySubConnectionProvider* CDummySubConnectionProvider::NewL(ESock::CSubConnectionProviderFactoryBase& aFactory) |
224 CDummySubConnectionProvider* CDummySubConnectionProvider::NewL(ESock::CSubConnectionProviderFactoryBase& aFactory) |
231 { |
225 { |
232 CDummySubConnectionProvider* self = new (ELeave) CDummySubConnectionProvider(aFactory, DummySCPRStates::stateMap::Self()); |
226 CDummySubConnectionProvider* self = new (ELeave) CDummySubConnectionProvider(aFactory, DummySCPRStates::stateMap::Self()); |
233 CleanupStack::PushL(self); |
227 CleanupStack::PushL(self); |
234 self->ConstructL(KDummySCPRPreallocatedActivityBufferSize); |
228 self->ConstructL(); |
235 CleanupStack::Pop(self); |
229 CleanupStack::Pop(self); |
236 return self; |
230 return self; |
237 } |
231 } |
238 |
232 |
239 CDummySubConnectionProvider* CDummySubConnectionProvider::NewVanillaL(ESock::CSubConnectionProviderFactoryBase& aFactory) |
233 CDummySubConnectionProvider* CDummySubConnectionProvider::NewVanillaL(ESock::CSubConnectionProviderFactoryBase& aFactory) |
240 { |
234 { |
241 CDummySubConnectionProvider* self = new (ELeave) CDummySubConnectionProvider(aFactory, VanillaDummySCPRStates::stateMap::Self()); |
235 CDummySubConnectionProvider* self = new (ELeave) CDummySubConnectionProvider(aFactory, VanillaDummySCPRStates::stateMap::Self()); |
242 CleanupStack::PushL(self); |
236 CleanupStack::PushL(self); |
243 self->ConstructL(KDummySCPRPreallocatedActivityBufferSize); |
237 self->ConstructL(); |
244 CleanupStack::Pop(self); |
238 CleanupStack::Pop(self); |
245 return self; |
239 return self; |
246 } |
240 } |
247 |
241 |
248 |
242 |